Repository used for workshop
🦀 Crabby command line !
$ crabby --help
Crabby cli
Usage: crabby_api <COMMAND>
Commands:
greets Greets with name
chifoumi Play chifoumi with players
search Search news by keyword
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
You'll need to install:
TLDR;
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Rust requires certain C++ build tools. You can either download the Microsoft C++ Build Tools, or (recommended) you might prefer just to install Microsoft Visual Studio.
More about Installation setup on windows
Minimum Version : 1.72+ (tested)
rustc --version
rustc 1.72.1 (d5c2e9c34 2023-09-13)
Keep your rust up-to-date with the latest release of rust, type:
rustup update
- VS Code:
- Jetbrains Rust:
- Vim/Neovim plugin :
When your computer is annoying or you are not admin...
- Online Playground
- gitpod (inside brower or in your IDE)
- Part 1 - Env setup
- Part 2 - Syntax
- Part 3 - Command args and options
- Part 4 - Modules and conversion
- Part 5 - Better command help documenter son application
- Part 6 - Api call with Json Parsing
❗ Try your solution first. Errors help to learn with Rust
Each part have a working solution
// inside each directory
cd <partx>/solutions
cargo run
Run solutions :
// from git root directory
cargo run --bin crabby_setup
cargo run --bin crabby_syntax
cargo run --bin crabby_args
cargo run --bin crabby_cli
cargo run --bin crabby_api
bin name is defined in related
<partx>/solutions/Cargo.toml
files
You are not required to write test during workshop but it always a good pratice so have a look !
// all
cargo test
//specific
cargo test --bin crabby_setup
cargo test --bin crabby_syntax
cargo test --bin crabby_args
cargo test --bin crabby_mod
cargo test --bin crabby_cli
cargo test --bin crabby_api