From 5d29091c5f29f22b800a75cc855ae4eb19240a19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 13:26:37 +0000 Subject: [PATCH] Publish package --- .changeset/odd-beans-bake.md | 33 -------------------------------- .changeset/open-symbols-tie.md | 5 ----- CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 36 insertions(+), 39 deletions(-) delete mode 100644 .changeset/odd-beans-bake.md delete mode 100644 .changeset/open-symbols-tie.md diff --git a/.changeset/odd-beans-bake.md b/.changeset/odd-beans-bake.md deleted file mode 100644 index c7b8f9a..0000000 --- a/.changeset/odd-beans-bake.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -'@codama/renderers-rust': major ---- - -Removed default `serde` support and replaced `kaigan` with `spl-collections` - -**BREAKING CHANGES:** - -- 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: - - `kaigan::types::RemainderStr` -> `spl_collections::TrailingStr` - - `kaigan::types::RemainderVec` -> `spl_collections::TrailingVec` - - `kaigan::types::U8PrefixString`, `U16PrefixString`, `U64PrefixString` -> `spl_collections::U8PrefixedStr`, `U16PrefixedStr`, `U64PrefixedStr` - - `kaigan::types::U8PrefixVec`, `U16PrefixVec`, `U64PrefixVec` -> `spl_collections::U8PrefixedVec`, `U16PrefixedVec`, `U64PrefixedVec` -- `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. -- 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. - -```diff - traitOptions: { - baseDefaults: [ - 'borsh::BorshSerialize', - 'borsh::BorshDeserialize', -+ 'serde::Serialize', -+ 'serde::Deserialize', - 'Clone', - 'Debug', - 'Eq', - 'PartialEq', - ], -+ featureFlags: { -+ serde: ['serde::Serialize', 'serde::Deserialize'], -+ }, - } -``` diff --git a/.changeset/open-symbols-tie.md b/.changeset/open-symbols-tie.md deleted file mode 100644 index 8d20b6c..0000000 --- a/.changeset/open-symbols-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@codama/renderers-rust': major ---- - -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. diff --git a/CHANGELOG.md b/CHANGELOG.md index f020de9..1d43352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # @codama/renderers-rust +## 3.0.0 + +### Major Changes + +- [#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` + + **BREAKING CHANGES:** + - 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: + - `kaigan::types::RemainderStr` -> `spl_collections::TrailingStr` + - `kaigan::types::RemainderVec` -> `spl_collections::TrailingVec` + - `kaigan::types::U8PrefixString`, `U16PrefixString`, `U64PrefixString` -> `spl_collections::U8PrefixedStr`, `U16PrefixedStr`, `U64PrefixedStr` + - `kaigan::types::U8PrefixVec`, `U16PrefixVec`, `U64PrefixVec` -> `spl_collections::U8PrefixedVec`, `U16PrefixedVec`, `U64PrefixedVec` + - `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. + - 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. + + ```diff + traitOptions: { + baseDefaults: [ + 'borsh::BorshSerialize', + 'borsh::BorshDeserialize', + + 'serde::Serialize', + + 'serde::Deserialize', + 'Clone', + 'Debug', + 'Eq', + 'PartialEq', + ], + + featureFlags: { + + serde: ['serde::Serialize', 'serde::Deserialize'], + + }, + } + ``` + +- [#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. + ## 2.0.1 ### Patch Changes diff --git a/package.json b/package.json index d463815..4e9bca1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codama/renderers-rust", - "version": "2.0.1", + "version": "3.0.0", "description": "Renders Rust clients for your programs", "exports": { "types": "./dist/types/index.d.ts",