You can build a Rust command-line tool on a laptop and run it on a small Linux server. It takes a target, a linker, and a quick check.
Pick a target
A target is a triple that names the CPU, vendor and operating system. For a 64-bit Intel or AMD Linux server using musl, it is x86_64-unknown-linux-musl. As of October 2026, the rustc platform support page lists it as Tier 2 without host tools, with full standard library support. The Rust project builds official releases of the standard library for Tier 2 targets and checks after each change that they can be used as build targets, but automated tests are not always run.
Add the target and build
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
The rustup documentation says rustup target add only installs the standard library for the target. It adds that other tools are typically needed, “particularly a linker”.
Name a linker if the link step fails
Install a linker for the target, then tell Cargo about it in .cargo/config.toml. The Cargo configuration reference gives this form:
[target.x86_64-unknown-linux-musl]
linker = "<your-linker>"
The same page documents build.target, which sets a default target so you can drop --target.
Why musl
The Rust Reference says most targets link the C runtime dynamically by default. It lists x86_64-unknown-linux-musl among the exceptions that link it statically. The binary carries its C runtime with it instead of loading the server’s.
Smoke test
- Run
fileon the binary. It reports the architecture and whether the file is statically linked. - Copy it to the server.
- Run
./yourtool --versionthere.
If step 3 prints a version, the target and linker are right.

The Campfire
No commentsNobody has pulled up a log by this one yet. Be the first to say what you make of it.
Held for the desk. It appears after a look.