-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add some basic usage docs to README. #319
Conversation
README.md
Outdated
Use the `subxt-cli` CLI tool to download the metadata for your target runtime from a Substrate node. | ||
|
||
```bash | ||
cargo run -p subxt-cli -- metadata -f bytes > metadata.scale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure would be good to have a release on crates so we could write cargo install subxt-cli
here. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose there's nothing stopping us releasing a subxt-cli
0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
pub mod node_runtime { } | ||
``` | ||
|
||
**Important:** `runtime_metadata_path` resolves to a path relative to the directory where your project's `Cargo.toml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dq: relative the workspace Cargo.toml or the current crate's Cargo.toml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah whatever std::env::var("CARGO_MANIFEST_DIR")
resolves to, which is would be the workspace I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was curious so I had a play; it looks like, however you try compiling a crate in a workspace, CARGO_MANIFEST_DIR is always relative to the crate itself and not the workspace.
Which makes sense I think :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes the clue is in the name!
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this'll be tweaked when the binary is published to crates.io, lgtm!
* Add some basic usage docs to README. * Update README.md Co-authored-by: David <dvdplm@gmail.com> * Update README.md Co-authored-by: David <dvdplm@gmail.com> * Update README to specify subxt-cli usage * Clarify CARGO_MANIFEST_DIR path Co-authored-by: David <dvdplm@gmail.com>
No description provided.