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

Add some basic usage docs to README. #319

Merged
merged 5 commits into from Nov 15, 2021
Merged

Add some basic usage docs to README. #319

merged 5 commits into from Nov 15, 2021

Conversation

ascjones
Copy link
Member

No description provided.

README.md Outdated Show resolved Hide resolved
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
Copy link
Contributor

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. :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely!

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated Show resolved Hide resolved
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`
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Collaborator

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 :)

Copy link
Member Author

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!

ascjones and others added 2 commits November 12, 2021 11:44
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
Copy link
Collaborator

@jsdw jsdw left a 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!

@ascjones ascjones merged commit 45e776d into master Nov 15, 2021
@ascjones ascjones deleted the aj-readme branch November 15, 2021 09:43
0623forbidden pushed a commit to DEIPworld/substrate-subxt that referenced this pull request Feb 15, 2022
* 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>
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

Successfully merging this pull request may close these issues.

None yet

4 participants