Crates.io | substrate-deps |
lib.rs | substrate-deps |
version | 0.2.0 |
source | src |
created_at | 2019-10-28 09:54:43.81612 |
updated_at | 2020-03-12 12:56:23.600387 |
description | Substrate-deps, a command line tool for managing Parity Substrate runtime pallet dependencies. |
homepage | https://github.com/paritytech/substrate-deps |
repository | https://github.com/paritytech/substrate-deps |
max_upload_size | |
id | 176338 |
size | 167,802 |
substrate-deps
is a command line tool for managing Parity Substrate pallet dependencies.
The following commands are available:
Install substrate-deps
locally with:
cargo install substrate-deps
substrate-deps add
Add a new pallet dependency to your Substrate runtime's Cargo.toml
.
To add the Substrate Contracts pallet-contracts
pallet:
$ # Add the pallet pallet-contracts to the runtime whose manifest is specified as argument.
$ substrate-deps add pallet-contracts --alias contracts --manifest-path ../substrate-package/substrate-node-template/runtime/Cargo.toml
Added pallet pallet-contracts v2.0.0-alpha.3 configuration in your node runtime manifest.
Added pallet pallet-contracts v2.0.0-alpha.3 configuration in your node runtime.
$ substrate-deps add --help
USAGE:
substrate-deps add [FLAGS] [OPTIONS] <pallet>
FLAGS:
-h, --help Prints help information
-q, --quiet No output printed to stdout
-v, --verbose Use verbose output
-V, --version Prints version information
OPTIONS:
-a, --alias <alias> Alias to be used in code & config e.g. staking instead of pallet-staking
--manifest-path <path> Path to the manifest of the runtime. [default: Cargo.toml]
--registry <registry> Registry to use. [default: crates-io]
ARGS:
<pallet> Pallet to be added e.g. pallet-staking
This command allows you to add a new pallet dependency to your Substrate runtime's Cargo.toml manifest file. substrate-deps add
will fetch the pallet from crates.io (or the give alternate registry), and add it to your runtime's Cargo.toml
and libs.rs
files.
substrate-deps graph
Generates a dependency graph of the pallets used by your Substrate runtime e.g.
This command output a dependency graph for graphviz, please make sure your have it install to be able to generate an image file with the instruction below.
$ # Generate a dependency graph of the pallets used by the runtime whose manifest is specified as argument and pipe it to the dot command to generate an image file.
$ substrate-deps graph --manifest-path ../substrate-package/substrate-node-template/runtime/Cargo.toml | dot -Tpng > graph.png
$ substrate-deps graph --help
substrate-deps-graph
Generate a graph of the Substrate runtime pallet dependencies.
USAGE:
substrate-deps graph [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-I, --include-versions Include the dependency version on nodes
-q, --quiet No output printed to stdout
-v, --verbose Use verbose output
-V, --version Prints version information
OPTIONS:
--manifest-path <path> Path to the manifest of the runtime. [default: Cargo.toml]
This project is licensed under either of
at your option.