| Crates.io | arm-toolchain |
| lib.rs | arm-toolchain |
| version | 0.1.0 |
| created_at | 2025-12-06 01:23:43.154913+00 |
| updated_at | 2025-12-06 01:23:43.154913+00 |
| description | Manage and use the embedded ARM toolchain |
| homepage | |
| repository | https://github.com/vexide/arm-toolchain |
| max_upload_size | |
| id | 1969501 |
| size | 187,755 |
ARM Toolchain Manager is a tool for installing and managing the LLVM-based ARM embedded toolchain.
arm-toolchain command: Utility for the downloading, installing, and managing of ARM toolchainsatrun command: Run commands from the active toolchain without adding it to your PATH.You can download and activate the latest toolchain with this command:
arm-toolchain use latest
Or pick a custom version:
arm-toolchain use v21.1.0
Once you've activated a toolchain, run commands from it with atrun:
$ atrun clang -print-targets
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
arm - ARM
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
armeb - ARM (big endian)
thumb - Thumb
thumbeb - Thumb (big endian)
Using atrun has the same effect of invoking arm-toolchain run, but it's shorter to type.
Use the locate subcommand to get the path to the active toolchain, or a specified one.
arm-toolchain locate
export PATH="$(arm-toolchain locate bin):$PATH"
arm-toolchain locate -T v21.1.0
export PATH="$(arm-toolchain locate bin -T v21.1.0):$PATH"
If you are collaborating with others, you might want to make a symlink to the toolchain so that you can refer to its path without hardcoding anything too unpredictable. Here's how you'd do that:
echo "/toolchain" >> .gitignore
ln -s "$(arm-toolchain locate)" toolchain
After this initial setup, you can use consistent paths in other places.
./toolchain/bin/clang -print-targets
export C_INCLUDE_PATH="toolchain/lib/clang-runtimes/arm-none-eabi/include"
You can view all the installed toolchains with the list subcommand.
$ arm-toolchain list
Active: v21.1.1
Installed:
- v21.1.1
- v21.1.0
You can remove toolchains when you're done using them.
arm-toolchain remove v21.1.0
arm-toolchain remove all
You can also purge the download cache to save space. arm-toolchain will delete things from the cache after it finishes downloading them, but if it gets interrupted you might end up with some excess files in there.
arm-toolchain purge-cache
If your Rust project uses the xtask pattern, you can make arm-toolchain a subcommand by adding it to your existing parser.
[dependencies]
arm_toolchain = { version = "*", features = ["cli"] }
use arm_toolchain::cli::ArmToolchainCmd;
#[derive(Debug, clap::Parser)]
enum Args {
// ...
Toolchain(ArmToolchainCmd),
}
#[tokio::main]
async fn main() -> miette::Result<()> {
let args = Args::parse();
match args {
// ...
Args::Toolchain(cmd) => {
cmd.run().await?;
}
}
}
Now you can use the tool without having to install the standalone command.
cargo xtask toolchain use latest
All of this tool's functionality is exposed programmatically for your custom scripting needs. To access it, your project will need to be using the Tokio runtime.
let client = ToolchainClient::using_data_dir().await?;
let installed = client.installed_versions().await?;
println!("Installed toolchains:");
for version in installed {
let toolchain = client.toolchain(&version);
println!("- {version} at {}", toolchain.path.display());
}