This template provides a Rust development environment for Visual Studio Code. The development container is based on the Arch Linux image.
- Install Visual Studio Code
- Install Docker
- In VSCode go to Extensions and install the Dev Containers extension
- Open the project directory (the one with
.devcontainer
subdirectory in it) - VSCode will prompt you to reopen the folder in container. Alternatively you can go to View > Commands Palette and look up Open Folder in Container
The set up is built with the following tool chains in mind and supports cross-compilation:
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl
You should set the active tool chain to the one matching your platform.
You can select your toolchain using the RUSTUP_TOOLCHAIN
variable, e.g.:
RUSTUP_TOOLCHAIN=1.85 make build
You set the build target using CARGO_BUILD_TARGET
variable, e.g.:
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl make build