-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Accounts + Program IDL/Schema traits #22
Labels
Comments
armaniferrante
changed the title
Accounts IDL/Schema trait
Accounts + Program IDL/Schema traits
Jan 15, 2021
related: #454 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Suppose I had a field
foo
of typecrate_a::MyAccountsA
that is embedded intocrate_b::MyAccountsB
as follows.I would want the IDL emitted for
crate_b
to have all the type i+ account nformation forfoo
.Currently this information is only available to
crate_a
, and socrate_b
would either have to re-definecrate_a::MyAccountsA
in its ownsrc/lib.rs
or use all the accounts in flattened form, instead of composingcrate_a::MyAccountsA
directly.Solution
To achieve this, we can have the various macros generate trait implementations providing IDL/type information. Additionally, we probably need to add some type of
build.rs
file that calls these generated traits to output the IDL, instead of just parsing the program's file directly, as we do now.The build steps might be organized into
The text was updated successfully, but these errors were encountered: