Reference
Environment variables
Compiler and tools#
| Variable | Used by | Meaning |
|---|---|---|
NOX_HOME |
noxc |
data directory for the package cache, global installs and installed.json (default ~/.nox) |
NOX_RESOURCE_DIR |
noxc |
use this directory instead of the one next to the executable to find the runtime object and standard library |
NOX_INDEX_URL |
search, add |
the package index to query: an https://…/index.json URL or a local file (default https://noxpkg.noxlang.com/index.json) |
NOX_PUBLISH_API_BASE |
publish, login, logout, whoami |
base URL of the registry's API (default https://noxpkg.noxlang.com); credentials are saved per server |
NOX_DENY_CAPABILITY |
every subcommand | same as --deny-capability: comma-separated capabilities the compiler rejects (fs, net, process, ...) |
NOX_NO_BROWSER |
login |
when set, noxc login does not try to open a browser (same as --no-browser) |
NOX_RUN_CACHE_MAX_MB |
run, test, cache prune |
size cap in MB for the noxc run/noxc test binary cache under $NOX_HOME/cache/run (default 512; 0 = no cap). Entries unused for 14 days are removed regardless; entries used in the last 10 minutes are never removed |
NOX_UPGRADE_API_BASE, NOX_UPGRADE_DOWNLOAD_BASE |
upgrade |
override where releases are looked up and downloaded (for mirrors and tests) |
NOX_ALLOW_INSECURE_TRANSPORT |
package/upgrade fetches | permit non-TLS transports (testing only; never in production) |
LC_ALL, LC_MESSAGES, LANG |
noxc --help |
a value starting with tr selects Turkish help; diagnostics and status lines stay English |
Installer#
| Variable | Meaning |
|---|---|
NOX_INSTALL_DIR |
where install.sh / install.ps1 unpack Nox (default ~/.nox-lang) |
NOX_VERSION |
install a specific release tag instead of the latest |
Programs you compile#
| Variable | Meaning |
|---|---|
NOX_POOL_WORKERS |
number of scheduler worker threads under the LLVM back end and wasm32-wasi-threads (overrides the compile-time default) |
NOX_WASM_NAMES |
with --asyncify/--threads (wasm): set to 1 to keep function names in the .wasm, so wasm stack traces are readable |
NOX_STACK_PAINT |
when set, measures fiber stack use and prints NOX_STACK_HWM_BYTES=<n> at exit |
NOX_OPENSSL_LIB |
full path of the OpenSSL library to load for serve_tls |
NOX_STRESS_ROUNDS |
number of rounds for the opt-in stress test |
Programs read their own environment with nox.os.getenv; nothing else in the standard library depends on environment variables.
Services (noxpkg)#
NOXPKG_ADMIN_PASSWORD_HASH (an Argon2id hash for the admin login) and NOXPKG_SESSION_SECRET (the session-cookie secret) configure the registry (noxpkg).