Tools

Environment variables

Every environment variable jaic, jacket, jailint and the language server read. See the environment registry.

Path lists use the platform separator (: on Linux and macOS, ; on Windows). An empty value counts as unset wherever a setting says so.

Settings

VariableMeaningWhen unsetRead by
JACKET_CHECK_TIME_LIMITSeconds one program check may take when the linter or language server runs compile-time code (0: no limit). CI sets it to 0.10 secondsjailint, jailsp
JACKET_OUTPUT_DIRRelocates the build output directory (the native-libs/ lookup and jacket test --coverage reports follow it).target/ in the projectjaic, jacket
JACKET_TEST_DLLSA path list of directories whose .dll files jacket test links next to each Windows test executable.unsetjacket
JAIC_ARThe program that archives object files into a static library.the system ar, or llvm-ar, a MinGW ar or lib.exe where that is neededjaic
JAIC_CACHE_DIRWhere jaic unpacks the helpers it embeds (the crash runtime).$XDG_CACHE_HOME/jaic, else the platform's user cache (~/Library/Caches/jaic, ~/.cache/jaic)jaic
JAIC_CROSS_LIBSA path list of directories with libraries cross-built for a MinGW target; a cross build links from these instead of the host's native libraries.unsetjaic
JAIC_DIAGNOSTICSThe diagnostic layout: plain, ascii or unicode.by terminal: unicode or ascii on one, plain otherwisejaic, jailint
JAIC_DSYMWhen set, a macOS debug build writes a .dSYM bundle instead of keeping its object files.unset: macOS debug builds keep their object files for the debuggerjaic
JAIC_HOST_TWIN_DEBUGWhen set, the host twin prints what it generates.unsetjaic
JAIC_ID_SCRAMBLEThe same as JAIC_SYM_SCRAMBLE, for AST ids.unsetjaic
JAIC_LINKERThe program that links executables and libraries. Empty counts as unset.the linker found for the targetjaic
JAIC_MEMORY_LIMITStop with exit status 120 once this much memory is allocated: bytes, or a number with a K, M or G suffix. Child processes inherit it.no limitjaic
JAIC_NATIVE_LIBSA path list of directories holding the prebuilt third-party native libraries (SDL3, FreeType, ...), replacing the default search.native-libs/<os>-<cpu> beside the library, else under target/jaic
JAIC_NO_HOST_TWINAny value but 0 turns the host twin off, which makes compile-time code with foreign calls fail the way it would without one.unset: compile-time code that needs the host's types gets a host twinjaic
JAIC_PRELUDEThe prelude file to load instead of the library's own, as a path (relative paths are taken from the library root).the library's prelude/module.jai, else Preload.jaijaic, jailint, jailsp
JAIC_PROGRESSThe build status lines: off, plain or live, whatever stderr is (-quiet still wins).by terminal: a live status line on one, nothing otherwisejaic, jacket
JAIC_SANITIZER_CCThe C driver that links a build made with a sanitizer.the clang of the LLVM jaic was built with, else ccjaic
JAIC_STDLIBThe standard library directory. jacket test also hands it to every jaic it starts.the stdlib/ next to the executable, else the checkout'sjaic, jacket, jailint, jailsp, tests
JAIC_SYM_SCRAMBLEA seed that spreads the interner's symbol numbers apart, so output that depends on them rather than spellings changes (tools/differential/determinism.py).unsetjaic
JAIC_TCPLISTENComma-separated host:port addresses a -interp -os wasm run listens on. Each becomes a pre-opened socket the program accepts connections from, numbered 3, 4, ... in order, and LISTEN_FDS holds how many there are (the convention of wasmtime's --tcplisten).unset: a -interp -os wasm run has no socketsjaic
JAIC_WASM_LDThe wasm-ld that links WebAssembly output.wasm-ld next to the build's LLVM, an LLD install, then PATHjaic

Set by one tool for another

VariableMeaningWhen unsetRead by
JACKET_PROJECTThe project name jaic shows in its Compiling line; jacket sets it.the main file's namejaic
JAIC_COVERAGE_DIRThe directory a -interp run writes its line coverage to, one file per program. jacket test --coverage sets it.the working directoryjaic
JAIC_COVERAGE_FILEThe file a -interp run writes its line coverage to.unset: the file is named for the program, in JAIC_COVERAGE_DIRjaic
JAIC_REPORT_EXEA file jaic appends the absolute path of each executable it writes to. jacket run and jacket test set it, because a metaprogram picks the name.unsetjaic

Tests and fuzzing

VariableMeaningWhen unsetRead by
EXPECTED_PRELUDEThe prelude the child process of the prelude-selection tests must find, or missing.unsettests
JACKET_DATABASE_URLA PostgreSQL connection URL for the typed-query tests.unset: the Postgres tests skiptests
JACKET_STDLIB_TARGETS_PARTK/N: the stdlib-by-target check takes every Nth module and target pair from the Kth, so CI can split it.1/1tests
JACKET_TEST_CODEGEN_UNITSPasses -codegen_units N to the native build tests, to run them split into several modules.unsettests
JAIC_ABI_CLANGThe clang the C ABI tests compare against.clangtests
JAIC_ABI_CROSSCross targets the C ABI tests also compile for, as a comma list of specs.unsettests
JAIC_CORPUS_ROOTThe checkout whose corpus/upstream and stdlib the corpus sweep parses.the repositorytests
JAIC_CORPUS_STAGEHow far the corpus sweep takes each file.parsetests
JAIC_KEEP_TEST_TMPWhen set, test scratch directories are kept after the test.unset: scratch directories are removedtests
JAIC_PRELUDE_TEST_CHILDMarks the child process of the prelude-selection tests, which run themselves again with JAIC_PRELUDE set.unsettests
JAIC_REQUIRE_TOOLCHAIN1, or a comma list of tool names: a missing tool fails the test instead of skipping it. Always on under CI.unset: a test whose tool is missing skipstests
JAIC_TEST_LIBRARY_MARKERA file the native-link test's library writes to, to show it was loaded.unsettests
JAIC_TEST_TMPDIRWhere test scratch directories are made.the system temporary directorytests
JAIC_WASM_TESTA value the WebAssembly test passes to the program, which prints it back.unsettests
JAILSP_ENFORCE_SCALE_BUDGET1: the language server scale test fails when a case is over its budget.unset: the budget is only reportedtests
JAI_FUZZ_VERBOSEWhen set, the fuzz harness prints each input it checks.unsetfuzzing
JAI_IDE_AUDIT_REVISIONRead at build time: the revision the language server coverage audit stamps into its report.unsettests
TYPING_FUZZ_DUMPA directory the typing-session rig writes the failing document to.unsettests

Standard variables

VariableMeaningWhen unsetRead by
ANSICONSet by ANSICON; marks a Windows console that takes ANSI control codes.unsetjaic, jacket
CCThe C compiler the native tests build their helper libraries with.cctests
CISet by CI services: the build status lines are plain, and a missing test tool fails instead of skipping.unsetjaic, jacket, tests
CLICOLOR_FORCEThe same as FORCE_COLOR.unsetjaic, jailint
COLUMNSThe width the live status line is fitted to.the terminal's widthjaic
ConEmuANSION marks a Windows console that takes ANSI control codes.unsetjaic, jacket, jailint
DEVELOPER_DIRThe Xcode installation whose SDK and libclang jaic uses.xcode-select -pjaic
FORCE_COLORAnything but 0 turns colour on even when output is not a terminal.unsetjaic, jailint
GITHUB_ACTIONSSet by GitHub Actions: tests that need a capable filesystem stop skipping.unsettests
GITHUB_TOKENSent with jacket upgrade's release lookups, which raises GitHub's rate limit.unsetjacket
HOMELocates the user cache when neither JAIC_CACHE_DIR nor XDG_CACHE_HOME is set.unsetjaic
INSTA_UPDATEalways rewrites the test snapshots instead of failing on a difference.unsettests
LANGSee LC_ALL.unsetjaic, jailint
LC_ALLWith LC_CTYPE and LANG: a UTF-8 locale selects the Unicode diagnostic layout.unsetjaic, jailint
LC_CTYPESee LC_ALL.unsetjaic, jailint
LIBOn Windows, the library directories the MSVC linker searches; set by a developer prompt.found from the Visual Studio and Windows SDK installsjaic
LIBRARY_PATHExtra library directories compile-time code may load native libraries from on Windows.unsetjaic
LLVM_PREFIXThe LLVM install to use when the llvm-sys variable above is unset. CI sets both.llvm-config --prefix, then Homebrew's llvm@<major> or /usr/lib/llvm-<major>jaic, jacket
LLVM_SYS_231_PREFIXThe LLVM install jaic is built against; its bin/ supplies clang, wasm-ld and the LLVM tools. The name carries the LLVM version (LLVM_SYS_<major><minor>_PREFIX).unsetjaic, jacket
MACOSX_DEPLOYMENT_TARGETThe macOS version native output targets.the SDK'sjaic
NO_COLORAny value turns colour off.unsetjaic, jacket, jailint
PATHWhere tools such as the linker, clang and wasm-ld are searched for.the process'sjaic, jacket, jailsp, tests
PATHEXTThe executable extensions tried when a test looks a tool up on Windows.the Windows defaulttests
ProgramFilesWhere Visual Studio and the Windows SDK are looked for.C:\Program Filesjaic
ProgramFiles(x86)See ProgramFiles.C:\Program Files (x86)jaic
RUST_BACKTRACEWhen set, an internal compiler error shows the Rust backtrace.unsetjaic
SystemRootLocates the Windows system tools jacket upgrade uses.C:\Windowsjacket
TERMdumb turns colour, layout characters and the live status line off.unsetjaic, jacket, jailint
WT_SESSIONSet by Windows Terminal; it gets the Unicode diagnostic layout.unsetjaic, jailint
XDG_CACHE_HOMEThe user cache root; jaic uses its jaic folder.unsetjaic