-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support unnamed structs in IDL #607
Comments
Arrays are currently supported in the IDL. Is there anything in the current implementation lacking for your use case? For example, generic lengths can't be used at the moment. |
I did not know that arrays are supported. Looks like I need to check IDL again 😄 |
It would be great if transparent newtype structs were at least supported, for example: #[derive(
Clone, Copy, Default, PartialOrd, Ord, PartialEq, Eq, AnchorSerialize, AnchorDeserialize,
)]
#[repr(transparent)]
pub struct Address(pub [u8; 20]); This compiles fine and generates an IDL with |
Added in #2824. |
In continue of #605.
How ⚓ should support unnamed structs (syn::Feilds::Unnamed)? I see two ways:
AnchorType
for example) which will add fields names to such structs:Additional derive macro looks better for me because it adds verbosity to JS and makes things more clear.
The text was updated successfully, but these errors were encountered: