codama-idl / codama

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

Support type aliases from DefinedTypeNodes in Rust renderer #152

Closed lorisleiva closed 2 months ago

lorisleiva commented 2 months ago

Currently, the Rust renderer can only render DefinedTypeNodes if the child type is a StructTypeNode or an EnumTypeNode.

This PR allows any other child type to be rendered as a Rust type alias like so.

pub type MyAlias = ShortVec<Pubkey>;
changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 075df15d2f779623632a711439a0331a05b7bc71

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

This PR includes changesets to release 2 packages | Name | Type | | ------------------------- | ----- | | @kinobi-so/renderers-rust | Patch | | @kinobi-so/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