Skip to content

Commit 0a65cc6

Browse files
Publish package (#91)
1 parent 4af6c06 commit 0a65cc6

4 files changed

Lines changed: 36 additions & 39 deletions

File tree

.changeset/odd-beans-bake.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.changeset/open-symbols-tie.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# @codama/renderers-rust
22

3+
## 3.0.0
4+
5+
### Major Changes
6+
7+
- [#92](https://github.com/codama-idl/renderers-rust/pull/92) [`4af6c06`](https://github.com/codama-idl/renderers-rust/commit/4af6c064a279e3d09feae4348a358286314f5a30) Thanks [@grod220](https://github.com/grod220)! - Removed default `serde` support and replaced `kaigan` with `spl-collections`
8+
9+
**BREAKING CHANGES:**
10+
- Generated variable-sized string/vector wrappers now come from `spl-collections` instead of `kaigan`. If you have handwritten code that references these generated wrapper types, update those imports and usages after regenerating your client:
11+
- `kaigan::types::RemainderStr` -> `spl_collections::TrailingStr`
12+
- `kaigan::types::RemainderVec<T>` -> `spl_collections::TrailingVec<T>`
13+
- `kaigan::types::U8PrefixString`, `U16PrefixString`, `U64PrefixString` -> `spl_collections::U8PrefixedStr`, `U16PrefixedStr`, `U64PrefixedStr`
14+
- `kaigan::types::U8PrefixVec<T>`, `U16PrefixVec<T>`, `U64PrefixVec<T>` -> `spl_collections::U8PrefixedVec<T>`, `U16PrefixedVec<T>`, `U64PrefixedVec<T>`
15+
- `serde` is no longer part of the default or recommended generated client surface. The previous default derives on wrapper types were misleading because their `serde` representation does not match the Borsh/Wincode wire format.
16+
- If you still want `serde` derives for a separate JSON representation, you can opt in explicitly via `traitOptions` as shown below. This does not make the generated types serde-compatible with their Borsh/Wincode wire format, but you can define a handwritten implementation with your own serde mapping as needed.
17+
18+
```diff
19+
traitOptions: {
20+
baseDefaults: [
21+
'borsh::BorshSerialize',
22+
'borsh::BorshDeserialize',
23+
+ 'serde::Serialize',
24+
+ 'serde::Deserialize',
25+
'Clone',
26+
'Debug',
27+
'Eq',
28+
'PartialEq',
29+
],
30+
+ featureFlags: {
31+
+ serde: ['serde::Serialize', 'serde::Deserialize'],
32+
+ },
33+
}
34+
```
35+
36+
- [#90](https://github.com/codama-idl/renderers-rust/pull/90) [`f214970`](https://github.com/codama-idl/renderers-rust/commit/f2149708b5e4a0167a2fe1289b685bd452497d17) Thanks [@grod220](https://github.com/grod220)! - Switch generated Rust code from `solana_pubkey::Pubkey` to `solana_address::Address` and update the default dependency set to newer Solana 3.x and `borsh` 1.0 versions. This affects generated program IDs, account/instruction types, PDA helpers, and public key literals, so downstream users may need to update imports and pubkey usage after regenerating clients.
37+
338
## 2.0.1
439

540
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codama/renderers-rust",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "Renders Rust clients for your programs",
55
"exports": {
66
"types": "./dist/types/index.d.ts",

0 commit comments

Comments
 (0)