Skip to content
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

Provide a way for adding custom metadata into the ABI #56

Open
miraclx opened this issue Sep 22, 2022 · 1 comment
Open

Provide a way for adding custom metadata into the ABI #56

miraclx opened this issue Sep 22, 2022 · 1 comment

Comments

@miraclx
Copy link
Contributor

miraclx commented Sep 22, 2022

The ABI spec allows arbitrary metadata;

/// Other arbitrary metadata.
#[serde(default, flatten, skip_serializing_if = "HashMap::is_empty")]
pub other: HashMap<String, String>,

I was thinking cargo-near could provide a way for users to seamlessly populate this entry, something like -M, --metadata that takes an =-delimited key-value pair, and is repeatable. Optionally, this could also take a comma-separated list of values for convenience.

Something like:

$ cargo near build --metadata a=b --metadata c=d
$ cargo near build -M a=b,c=d -M e=f

I personally think this is helpful, but I want to hear what you guys think about this.

@itegulov
Copy link
Contributor

I think this might be helpful, but I would rather wait for a user-driven demand to appear first to understand the use pattern. Unless you already have something specific in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants