Skip to content

Commit

Permalink
docs: Refactor sidebar navigation (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Mar 18, 2024
1 parent d931b31 commit 8fdc07b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
16 changes: 8 additions & 8 deletions docs/src/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ import 'focus-visible'
import '@/styles/tailwind.css'

const navigation = [
{
title: 'Prologue',
links: [
{ title: 'Release Notes', href: '/docs/release-notes' },
{ title: 'CHANGELOG', href: '/docs/changelog' },
{ title: 'Contribution Guide', href: '/docs/contribution-guide' },
],
},
{
title: 'Getting Started',
links: [
Expand All @@ -32,6 +24,13 @@ const navigation = [
{ title: 'Intro to Solana', href: '/docs/intro-to-solana' },
],
},
{
title: 'Release Notes',
links: [
{ title: '0.29.0', href: '/release-notes/0.29.0' },
{ title: 'CHANGELOG', href: '/release-notes/changelog' },
],
},
{
title: 'Core concepts',
links: [
Expand All @@ -58,6 +57,7 @@ const navigation = [
{
title: 'Guides',
links: [
{ title: 'Contribution Guide', href: '/docs/contribution-guide' },
{ title: 'Publishing Source', href: '/docs/publishing-source' },
{
title: 'Verifiable Builds',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
title: Release Notes
description: Anchor - Release Notes
title: Release Notes 0.29.0
description: Anchor - Release Notes 0.29.0
---

Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANGELOG.md) but it's not easy to make sense what has changed, what effect does the change have and how to migrate. This is where release notes comes in, an easy to digest and actionable view for each release.

---

## [0.29.0]

### How to update
## How to update

1. Update `avm`:

Expand All @@ -27,7 +25,7 @@ Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANG

4. Update TS package(s) to `0.29.0`.

### Solana `1.14` is no longer supported
## Solana `1.14` is no longer supported

Minimum supported Solana version is now `1.16.0` because

Expand All @@ -40,7 +38,7 @@ If you are still on Solana `1.14`, update by running:
solana-install init 1.17.0
```

### Override toolchain for the workspace
## Override toolchain for the workspace

`Anchor.toml` has a new section called `[toolchain]` that allows overriding the current toolchain versions inside the workspace.

Expand All @@ -50,13 +48,13 @@ anchor_version = "0.29.0" # `anchor-cli` version to use
solana_version = "1.17.0" # Solana version to use
```

#### Notes
### Notes

- Fields are optional.
- `anchor_version` requires [`avm`](https://github.com/coral-xyz/anchor/tree/master/avm) to be installed.
- Before this release, `anchor_version` and `solana_version` keys in `Anchor.toml` were being used for Docker verifiable builds only. Now, all commands work via the `[toolchain]` section.

### Install CLI from commit with `avm`
## Install CLI from commit with `avm`

It is possible to install CLI from commit by running:

Expand Down Expand Up @@ -94,7 +92,7 @@ Specify `toolchain.anchor_version` as `<VERSION>-<COMMIT>`:
anchor_version = "0.28.0-6cf200493a307c01487c7b492b4893e0d6f6cb23"
```

### Multiple files template
## Multiple files template

Programs created with `anchor init` or `anchor new` have a single `lib.rs` file but not everyone prefers a single file approach for programs.

Expand Down Expand Up @@ -123,7 +121,7 @@ or if you have an existing workspace:
anchor new <NAME> --template multiple
```

### Upgradeable programs in tests
## Upgradeable programs in tests

You can now configure upgradability of the programs in `anchor test`.

Expand All @@ -143,7 +141,7 @@ program = "swap.so"
upgradeable = true
```

### Lamport utilities
## Lamport utilities

Transferring lamports from a PDA is quite complicated due to the types that are being used.

Expand Down Expand Up @@ -175,7 +173,7 @@ let lamports = ctx.accounts.my_account.get_lamports();

**Note:** The new methods are not only more ergonomic but they are also more performant than the previous examples. This is because `to_account_info` method clones the data internally but the new methods use a reference to the underlying data.

### Type safe context bumps
## Type safe context bumps

Before this release, `ctx.bumps` used to be a `BTreeMap<String, u8>` which doesn't provide type safety for the keys(account names).

Expand All @@ -191,7 +189,7 @@ let bump = ctx.bumps.my_account;

**Note**: The new way is not only more intuitive but also is more performant. This is mainly because `BTreeMap` is heap-allocated and it has to resize and grow occasionally.

### `idl-build` feature
## `idl-build` feature

There is a new way to generate IDLs via compilation.

Expand All @@ -208,7 +206,7 @@ The IDL will be built automatically when you run `anchor build` but if you'd lik
anchor idl build
```

#### Notes
### Notes

- All crates that are being used for the IDL generation needs to be added to the `idl-build` feature list.

Expand All @@ -227,7 +225,7 @@ idl-build = [
- Generation time is a lot slower compared to the default method(parsing) due to Rust compile times.
- Even though most of it works great, some parts are still rough around the edges and you may encounter parts that are not fully ironed out. Please [create an issue](https://github.com/coral-xyz/anchor/issues) if you run into a problem.

### Type aliases
## Type aliases

Anchor IDL now supports type aliases.

Expand Down Expand Up @@ -284,7 +282,7 @@ Generates the following IDL:

**Note:** This example only works with the default IDL generation method(parsing) for now because type aliases for default Rust types don't work properly with `idl-build`([#2640](https://github.com/coral-xyz/anchor/issues/2640)).

### Export `mpl-token-metadata`
## Export `mpl-token-metadata`

`anchor-spl` with `metadata` feature enabled now exports the `mpl-token-metadata` crate.

Expand All @@ -302,7 +300,7 @@ and use the exported crate from `anchor-spl`:
use anchor_spl::metadata::mpl_token_metadata;
```

### TypeScript SDK improvements
## TypeScript SDK improvements

1. `Program.addEventListener` method is now strongly typed -- correct types for the event names and the event returned from the callback instead of `any`.

Expand All @@ -317,7 +315,7 @@ use anchor_spl::metadata::mpl_token_metadata;

4. Removed `assert` and `base64-js` dependency.

### New docker image
## New docker image

The previous image([projectserum/build](https://hub.docker.com/r/projectserum/build)) is now deprecated, new image is [backpackapp/build](https://hub.docker.com/r/backpackapp/build).

Expand All @@ -329,7 +327,7 @@ docker pull backpackapp/build:v0.29.0

**Note:** `anchor build --verifiable` now works with the latest image.

### Enhanced performance
## Enhanced performance

`0.29.0` performance is noticeably improved in all areas, the biggest one being [binary size](https://github.com/coral-xyz/anchor/blob/master/bench/BINARY_SIZE.md#0290) which is reduced ~36% compared to `0.28.0`!

Expand Down
File renamed without changes.

0 comments on commit 8fdc07b

Please sign in to comment.