learning-rust
Learning Guide to Become a Rustacean π¦
File Explorer
- rust.yml
- array.rs
- ch3_common_concepts.rs
- ch3_controlstatements.rs
- ch3_datatypes.rs
- ch3_functions.rs
- conditions.rs
- data_types.rs
- for.rs
- func.rs
- loops.rs
- tuples.rs
- variables.rs
- while.rs
- Vec.rs
- adaptor_pattern.rs
- builder_pattern.rs
- command_pattern.rs
- decorator_pattern.rs
- factory_pattern.rs
- observer_pattern.rs
- prototype_pattern.rs
- singleton_pattern.rs
- state_pattern.rs
- strategy_pattern.rs
- ch10_modules_modifier.rs
- ch10_modules_nested.rs
- ch10_modules_public_modifier.rs
- ch11_use_library_crate.rs
- ch2_guessing_game.rs
- ch4_ownership_move.rs
- ch5_structs.rs
- ch5_structs_method.rs
- ch5_structs_tuple.rs
- ch9_error_handling_panic.rs
- ch9_error_handling_result.rs
- ch9_error_handling_result_propagate.rs
- ch9_error_handling_result_propagate_shortcut.rs
- ch9_error_handling_unwrap.rs
- hello.rs
- README.md
- borrow_slices.rs
- borrow_string.rs
- dangling.rs
- hashmap_closure.rs
- NOTES.md
- ownership-ex1.rs
- ownership-integer.rs
- references
- borrowed_view.md
- cfg_and_platform.md
- enum.md
- hashmap.md
- is_err.md
- map.md
- return_vs_expression.md
- toolchain.md
- another_bin.rs
- main.rs
- greet.rs
- lib.rs
- math.rs
- Cargo.toml
- .gitignore
- Cargo.lock
- Cargo.toml
- Macros.md
- README.md
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
cargo build
View Details βΌ
cargo build
Compile a local package and all of its dependencies.
cargo {{[b|build]}}
Build the package or packages defined by the `Cargo.toml` manifest file in the local path:
cargo {{[b|build]}} {{[-r|--release]}}
Build artifacts in release mode, with optimizations:
cargo {{[b|build]}} --locked
Require that `Cargo.lock` is up to date:
cargo new
View Details βΌ
cargo new
Create a new Cargo package.
Equivalent of `cargo init`, but specifying a directory is required.
cargo new {{path/to/directory}}
Create a new Rust project with a binary target:
cargo run
View Details βΌ
cargo run
Run the current Cargo package.
Note: The working directory of the executed binary will be set to the current working directory.
cargo {{[r|run]}}
Run the default binary target:
cargo {{[r|run]}} --bin {{name}}
Run the specified binary:
cargo {{[r|run]}} --example {{name}}
Run the specified example:
