cxvm: per-project GCC and Clang versions on Linux
Description and use
cxvm enables per-project GCC/Clang version pinning on Linux, avoiding global changes and root access.
Problem
Embedded Linux developers need per-project GCC/Clang versions that differ from the system compiler, but existing solutions require root or affect all projects.
Outcome
cxvm allows developers to pin exact GCC/Clang versions per project, avoiding global changes, root access, and ensuring correct libstdc++ linkage via rpath.
Workflow
- Install cxvm via curl or cargo
- Use
cxvm install gcc@13to download GCC 13.4.0 - Navigate to project directory and run
cxvm use gcc@13to pin the compiler and generate .cxvm/ and .cxvmrc - Run CMake with the generated toolchain file or use
cxvm exec -- makefor non-CMake projects - Use
cxvm currentto verify active compiler
Evidence
cxvm keeps any number of GCC and Clang versions side by side under ~/.local/share/cxvm, and each project says which one it uses in a small file you commit
The CMake toolchain file adds an rpath to the pinned GCC's lib64, so the program finds the right libstdc++.so.6 on its own
cxvm is written in Rust and ships as one static musl binary
- Record date: 2026-10-12T14:55:55.558Z