rax does not use one centralized environment-variable schema. Variables are read by the runtime, helper scripts, benchmarks, or the independent microkernel build. Their scope and stability therefore differ. Prefer CLI or TOML for persistent VM configuration; use environment variables for host tooling, diagnostics, or script overrides.
Controls the tracing_subscriber filter used by the command-line binary.
RUST_LOG=debug ./target/release/rax ...
RUST_LOG=rax::vm=trace ./target/release/rax ...
RUST_LOG=rax::debug::gdb=trace ./target/release/rax ... --gdb 1234Without a valid environment filter, the CLI uses an info default. --gdb-trace adds the debugger module’s trace directive to the effective filter.
Operational caution: trace-level logs can contain addresses, register values, protocol traffic, paths, and guest-derived data.
These variables are developer controls rather than stable public configuration fields. Keep source and tests authoritative.
Disables x86 hot-region promotion at runtime in a build that contains smir-jit:
RAX_NO_JIT=1 ./target/release/rax ...Use it to establish an interpreter baseline without rebuilding. It does not remove JIT code from the binary.
Enables runtime comparison for supported x86-64 compiled regions:
RAX_JIT_VERIFY=1 ./target/release/rax ...Verification mode is itself scoped: it compares the state projection implemented by that path for regions that are admitted and executed. It is not formal proof and may alter performance substantially.
Disables or rejects helper/call-containing native regions in the relevant JIT path:
RAX_JIT_NO_CALL=1 ./target/release/rax ...Use it when isolating helper ABI, call-clobber, or region-admission problems.
Disables or rejects memory-containing native regions in the relevant JIT path:
RAX_JIT_NO_MEM=1 ./target/release/rax ...Use it to distinguish register/flag lowering from guest-memory helper behavior.
These controls are not equivalent to Cargo features. RAX_NO_JIT=1 changes runtime promotion; --no-default-features omits the native tier from the build.
RAX_NO_JIT also establishes an x86-64 interpreter baseline for rax-user.
RV64 process JIT selection uses its --riscv-jit option; i386 compatibility
code stays interpreted.
TMPDIR selects the host temporary namespace used by emulated System V and
POSIX IPC, macOS abstract Unix sockets, and the emulated inotify hub. Processes
that must share those objects need the same namespace. The fixture runner
allocates a private TMPDIR for each run so unrelated cases do not share it.
RAX_USER_DOCKER_ORACLE is a presence switch used only by the ignored
user_linux live Docker comparison. Without it, that test reports NOT RUN
even with --include-ignored; setting it also requires a usable Docker daemon
and the three-architecture execution setup. The ordinary recorded-result
comparisons do not need Docker.
RAX_USER_DOCKER_ORACLE=1 cargo test --release --locked --no-default-features \
--features smir-jit --test user_linux -- --ignored --nocapture--seed controls AT_RANDOM and getrandom bytes; it does not make host
timing or all process scheduling deterministic. See Linux programs.
Some 32-bit Arm integration work uses an implementation-specific machine selector. The documented value is:
RAX_MACHINE=s5l8900 ./target/release/rax ...Treat this as a specialist development interface, not a general substitute for --arch. The selected machine still requires a compatible image, ISA mode, load/entry state, and devices. Record it in reproduction instructions because omitting it can select a different machine path.
The root run.sh helper reads the following variables before launching the software x86 Linux baseline.
Kernel path. Default:
linux/vmlinux
Example:
RAX_KERNEL=/tmp/linux/vmlinux ./run.shInitramfs path. Default:
initrd.cpio.gz
Set an empty or alternate path only if the script and selected guest support that use.
Guest architecture passed to the CLI. Default:
x86-64
Backend passed to the CLI. Default:
emulator
Guest memory passed to the CLI. Default:
512M
Overrides the helper’s known x86 software-boot kernel command line.
Example:
RAX_KERNEL=linux/vmlinux \
RAX_INITRD=initrd.cpio.gz \
RAX_ARCH=x86-64 \
RAX_BACKEND=emulator \
RAX_MEMORY=1G \
RAX_CMDLINE='console=ttyS0 earlyprintk=serial,ttyS0,115200 nokaslr' \
./run.shThe helper variables are script inputs. They are not automatically read by a direct ./target/release/rax invocation.
Adds Rust compiler flags. Common local examples:
RUSTFLAGS='-C target-cpu=native' cargo build --release
RUSTFLAGS='-C target-cpu=x86-64-v3' cargo test --releaseThis can change instruction selection, performance, host compatibility, code generation, and therefore test behavior. Include it in benchmark and bug reports.
Controls the CPU target used by the repository PGO flow. The script defaults to native; use an explicit baseline when the output must run elsewhere:
PGO_TARGET_CPU=x86-64-v3 make pgoRecord the training workload and final target CPU. PGO artifacts cannot be compared meaningfully without them.
The PGO script creates its private working directory under PGO_TMPDIR, falling back to TMPDIR and then /tmp:
PGO_TMPDIR="$HOME/.cache/rax-pgo" make pgoThe selected parent must permit creation of a user-owned mode-0700 temporary directory. The script validates ownership and permissions before placing raw profiles there. PGO_TMPDIR is the project-specific override; TMPDIR is the conventional process fallback.
Overrides the Linux tag fetched by make linux; the current Makefile default is v6.12:
make linux LINUX_VERSION=v6.6The output path remains linux/vmlinux. A different kernel version can expose a different software-CPU or platform surface, so include the tag in boot reports.
The microkernel/ package is independent of the root Cargo workspace and has its own Makefile/scripts.
Selects the rax executable used by the microkernel runner:
RAX_BIN=../target/release/rax make -C microkernel runForces rebuild behavior in the microkernel scripts where supported:
FORCE_BUILD=1 make -C microkernel runControls the memory argument used by the microkernel runner:
MEM=256M make -C microkernel runThis name is specific to the microkernel tooling; it is not the root VM CLI’s environment interface.
Selects the object-copy tool when constructing flat or architecture-specific artifacts:
OBJCOPY=llvm-objcopy make -C microkernelSelects the directory containing sde64 for the hosted x86 comparison:
SDE_PATH=/opt/sde make -C microkernel test-sdeThe microkernel Makefile invokes $SDE_PATH/sde64; alternatively, put sde64 on PATH. Intel SDE is external and is not downloaded by the root build.
Use this priority when choosing a control surface:
- Use CLI for a one-off, visible VM invocation.
- Use TOML for persistent guest/machine configuration.
- Use
run.shvariables only when invokingrun.sh. - Use runtime developer variables for targeted diagnostics.
- Use build variables for compiler/PGO/microkernel tooling.
Do not place secrets in these variables merely because they are not command-line flags. They may appear in process environments, shell history, CI logs, crash reports, or diagnostic output.
Include only the variables that were actually set:
RUST_LOG=
RUSTFLAGS=
RAX_NO_JIT=
RAX_JIT_VERIFY=
RAX_JIT_NO_CALL=
RAX_JIT_NO_MEM=
RAX_USER_DOCKER_ORACLE=
RAX_MACHINE=
RAX_KERNEL=
RAX_INITRD=
RAX_ARCH=
RAX_BACKEND=
RAX_MEMORY=
RAX_CMDLINE=
PGO_TARGET_CPU=
PGO_TMPDIR=
TMPDIR=
LINUX_VERSION=
RAX_BIN=
FORCE_BUILD=
MEM=
OBJCOPY=
SDE_PATH=
An unset variable and an explicitly empty variable can have different shell/script effects; preserve that distinction.