codama-idl / codama

Generate clients, CLIs, documentation and more from your Solana programs
MIT License
103 stars 20 forks source link

Add `anchorTraits` option to Rust renderer #250

Closed febo closed 1 month ago

febo commented 1 month ago

Problem

The Rust renderer includes the implementation of Anchor traits by default under the anchor and anchor-idl-build features. This creates a problem when generating a client for a solana-program version not compatible with Anchor.

Solution

Add an anchorTraits option to the Rust renderer to be able to toggle the implementation of Anchor traits. The default value is set to true to keep the current behaviour.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: e4c2deaaf4decba8f43b080340ba6593a5d9dc88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ---------------------- | ----- | | @codama/renderers-rust | Patch | | @codama/renderers | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR