The easiest way to manage Rust with Devbox is to install , and then configure the channel you wish to install via Devbox’s . You can also use the to configure to install the Rust toolchain locally.
{ "packages": ["rustup@latest", "libiconv@latest"], "shell": { "init_hook": [ "projectDir=$(dirname $(readlink -f \"$0\"))", "rustupHomeDir=\"$projectDir\"/.rustup", "mkdir -p $rustupHomeDir", "export RUSTUP_HOME=$rustupHomeDir", "export LIBRARY_PATH=$LIBRARY_PATH:\"$projectDir/nix/profile/default/lib\"", "rustup default stable", "cargo fetch" ], "scripts": { "test": "cargo test -- --show-output", "start": "cargo run", "build-docs": "cargo doc" } } }
Was this page helpful?