Skip to content
Andrei Montchik edited this page Apr 29, 2024 · 6 revisions

Docs

How To

  • 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
  • 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

Review installed Cargo bins

  • cargo install --list

Build

Format

  1. Configure formatting in the rustfmt.toml
  2. Run cargo +nightly fmt --all
  • Run in single thread: cargo test -- --test-threads=1
  • Show system out: cargo test -- --show-output

Clean

Compiled binaries

  • Manual: rm -r target.

Cargo Cache

  • Using cargo: cargo clean.
  • Manual: rm -r ~/.cargo/registry/cache.

Uninstall

  1. Run rustup self uninstall.
  2. Remove the ~/.cargo directory, if exists.
  3. Remove the RUSTUP_HOME or CARGO_HOME setting from dot files, if any.
  4. Re-logon.

Review coredumps

  • Refer to Validator -> Where is it? -> Core dumps for the core dump config
  • the binary location is target/debug

Clone this wiki locally