-
Notifications
You must be signed in to change notification settings - Fork 0
Rust
Andrei Montchik edited this page Apr 29, 2024
·
6 revisions
- The Book
- Rust Reference
- Rust by Example
- The Rustonomicon - the Dark Arts of Unsafe Rust
- The Little Book of Rust Macros
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Show the current Rust version:
rustc --version - Install the toolchain:
- Stable version:
rustup toolchain install stable - Specific version:
rustup toolchain install <version> - Install nightly version:
rustup toolchain install nightly
- Stable version:
- Setup the default toolchain version:
rustup default <version> - Confirm the toolchain version:
rustup --version - Review installed and active versions f Rust and toolchains:
rustup show
cargo install --list
- Run
cargo build - To avoid CPU targeting optimization compiler flags
- Show dependencies:
cargo tree
- Configure formatting in the
rustfmt.toml - Run
cargo +nightly fmt --all
- Run in single thread:
cargo test -- --test-threads=1 - Show system out:
cargo test -- --show-output
- Manual: rm -r
target.
- Using cargo:
cargo clean. - Manual:
rm -r ~/.cargo/registry/cache.
- Run
rustup self uninstall. - Remove the
~/.cargodirectory, if exists. - Remove the RUSTUP_HOME or CARGO_HOME setting from dot files, if any.
- Re-logon.
- Refer to Validator -> Where is it? -> Core dumps for the core dump config
- the binary location is
target/debug