Skip to content

Support unnamed structs in IDL #607

@fanatid

Description

@fanatid

In continue of #605.

How ⚓ should support unnamed structs (syn::Feilds::Unnamed)? I see two ways:

  1. Add arrays support to IDL.
  2. Add a new derive macro (AnchorType for example) which will add fields names to such structs:
#[derive(AnchorType)]
struct Z(#[field(name = x)] u64, #[field(name = y)] u64);

Additional derive macro looks better for me because it adds verbosity to JS and makes things more clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions