Install
Volt is built from source. The first compiler, voltc-bootstrap, is written in Rust; it builds
voltc, the real compiler, which is written in Volt.
What you need
Section titled “What you need”-
Rust (stable) and a C compiler:
ccby default, or set$CC(gcc,clang, evenccache gcc). -
LLVM 23 with its C headers, and libclang (
llvm-c/andclang-c/). voltc links libLLVM for its LLVM backend and libclang to read C layouts and C++ headers. On Arch that’s thellvmandclangpackages. On Debian and Ubuntu, add LLVM’s own apt repository and install the dev packages:Terminal window wget https://apt.llvm.org/llvm.sh && sudo bash llvm.sh 23sudo apt install llvm-23-dev libclang-23-devvoltc’s build asks
llvm-configwhere LLVM is ($LLVM_CONFIG, elsellvm-config-23, elsellvm-configon yourPATH), so it can live off the default paths, like Ubuntu’s/usr/lib/llvm-23. -
Optional, for the interop tests:
c++(g++ 14 or newer, or clang++, for the C++23 headers; or set$CXX),rustcandpython3; andzig,go,node, a JDK 22 or later,dotnet,lua5.4,dart,swiftc,kotlinc-nativeandruby, whose tests are skipped when they’re missing.
git clone https://github.com/ChaseSunstrom/volt-bootstrap voltcd voltcargo build --release # target/release/voltc-bootstrap and boltcd voltc && ../target/release/bolt build --release && cd .. # voltc/target/release/voltcThe second step is bolt building the self-hosted compiler with the bootstrap one. Put both on your
PATH. Run this once, in the repository, so $PWD writes its full path into ~/.bashrc (a $PWD
inside ~/.bashrc itself would be wherever the shell starts):
echo "export PATH=\"$PWD/voltc/target/release:$PWD/target/release:\$PATH\"" >> ~/.bashrcsource ~/.bashrcvoltc finds the standard library by itself: a std/ directory next to it or up to three levels
above (the repository’s, from voltc/target/release/), or, for an installed toolchain, the
lib/volt/std that sits beside its bin directory. $VOLT_STD or --std DIR picks another. bolt runs $VOLTC when it’s set, then a
voltc next to itself or on your PATH, then voltc-bootstrap.
Check it
Section titled “Check it”voltc run examples/tour.volt # the language tour: it prints what each part doescargo test # the whole suite: goldens, bolt, interop, the site's codeNext, write a first program.