/dstack-rust:rust-crossfrom DStack Rust
Cross-compiles Rust binaries for other architectures and OSes using cross, cargo-zigbuild, or custom linkers, with artifact verification.
Ships in DStack Rust. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You get Rust building for a different CPU, OS, or ABI and prove the output matches. Triples, linkers, runners, and verification all live here.
Authority stays local. This skill edits .cargo/config.toml, Cross.toml, and Cargo.toml, installs rustup targets, and writes target/ build directories (plus Docker images when cross is used). Rollback reverts the edited files, runs rustup target remove <triple> for targets it added, and removes build artifacts. Nothing mutates a remote. The work is done when the chosen target builds with the selected driver and the output matches the intended triple and linking mode.
What you need before starting:
aarch64-unknown-linux-gnu or thumbv7em-none-eabihf).rustup targets from rustup target list --installed.cargo, cross, cargo-zigbuild, or direct rustc with a system cross-linker.zig cc, or a system cross-linker.qemu command.Match CPU, vendor, OS, and ABI to the platform. Look the triple up in references/cross-targets.md when the platform is unfamiliar. Install it with rustup target add <triple> and confirm it in rustup target list --installed.
Three routes cover the common cases:
cross build --target <triple> for hermetic Docker based builds; add a Cross.toml when the image needs extra packages.cargo zigbuild --target <triple> to avoid a system cross-linker; this needs cargo-zigbuild and a Zig toolchain.cargo build --target <triple> with a linker set in .cargo/config.toml for direct builds.The driver is settled when a sample command runs without linker errors. A GNU Windows target is not MSVC coverage. For cargo-xwin, check the installed driver interface and prerequisites first and get owner acceptance of the SDK/CRT license before any download.
Add a [target.<triple>] section in .cargo/config.toml with linker, runner, and rustflags as needed. A static musl build sets rustflags = ["-C", "target-feature=+crt-static"]. Bare metal sets the default target and runner. Gate helper definitions and tests to their actual use-site configurations, and check that required tests stay selected instead of hiding failures with cfg or lint suppression.
Build, then confirm with file <binary> or readelf -h <binary> (ELF machine type and linking mode; file or objdump -f for Windows or macOS targets). Record host, exact target and ABI, driver, feature set, native dependencies, and the level actually verified: type checking, linking, or execution. A cross check is not native filesystem or runtime proof. Report output locations from the effective Cargo configuration. When native execution is unavailable, keep that gap explicit. Never manufacture parity through a substitute target or quietly skip a failing platform fixture.
| Signal | Response |
|---|---|
| Target not installed | Run rustup target add <triple> and retry |
| Linker not found | Install the system cross-linker or switch to cargo-zigbuild |
cross fails on a C dependency | Add a pre-build step to Cross.toml for the target package |
glibc version mismatch with cargo-zigbuild | Append the version to the triple, for example aarch64-unknown-linux-gnu.2.17 |
| Embedded binary does not run | Verify runner, default target, memory layout, and probe or emulator configuration |
A built artifact for the requested target; updated .cargo/config.toml and optionally Cross.toml or Cargo.toml profiles; and a short report with the build command, verification output, and any extra configuration.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gosuda/dstack-skills --plugin dstack-rust10 skills in this plugin
/cargo-workflowsUse when managing Cargo workspaces, feature flags, build scripts, CI caching, dependency auditing, or Cargo.lock with Rust./idiomatic-rustUse when writing, reviewing, or refactoring Rust code. Routes the task to handbook chapters on idioms, lints, errors, testing, generics, and pointers under the edition 2024 and current-stable pins./rust-async-internalsUse when understanding the Rust Future poll model, Pin and Unpin, tokio scheduling, async stack traces, waker leaks, or select!/join! behavior.Other plugins' skills for the same job