This week Cecile Tonglet explores how Substrate uses the Stuct Opt library to build an extensible CLI interface.
0:00 What is StructOpt
3:35 Example of using StructOpt
9:48 How Substrate's uses structOpt
12:23 Defining a Substrate Node CLI
22:00 Example adding a subcommand
28:08 Parsing complex parameters
31:08 Non Exhaustive Structs (https://github.com/rust-lang/rust/pul...)
33:12 Wiring additional parameters tog the service
36:50 The SubstrateCLI Trait
44:13 Live Coding another new parameter
55:28 Overriding default values for built-in flags
1:04:30 Adding a new subcommand
1:11:28 Polkadot's CLI
Links from the Seminar
UTXO node we hacked - https://github.com/substrate-develope...
Structopt docs - https://docs.rs/structopt/0.3.13/stru...
cargo watch - https://github.com/passcod/cargo-watch
⎼⎼⎼⎼⎼⎼⎼
→ For more videos on blockchain development and building Web 3.0,
subscribe to the channel: / @paritytech
→ Website: https://www.parity.io/
→ To stay informed about Parity updates and events,
subscribe to the newsletter: https://www.parity.io/newsletter/
→ Follow us on Twitter (@ParityTech): / paritytech
→ Check our code on GitHub: https://github.com/paritytech/
#rustlang #substrate #blockchaindevelopment