Environment
Environment files
Section titled “Environment files”The $env macro reads values at compile time in this priority order:
- the process environment
.env.<NODE_ENV>.env
Keep the files in the same directory as your tsconfig.json. NODE_ENV itself resolves from the process environment, then .env. The format is KEY=VALUE lines with # comments and optional single or double quotes.
Variables
Section titled “Variables”| Variable | Effect |
|---|---|
NODE_ENV |
Picks the .env.<NODE_ENV> file for $env |
RBXTSC_WRITE_CONCURRENCY |
Output-write workers. Takes precedence over ROTOR_WRITE_WORKERS, capped at 256 |
ROTOR_WRITE_WORKERS |
sloptor's own output-write override |
ROTOR_SIDECAR_PATH |
Overrides the transformer sidecar location for repository development and tests |
ROTOR_MAX_BUILDS |
Concurrent builds sharing the machine; 0 disables the build-slot queue |
RAYON_NUM_THREADS |
Checker worker threads. Overrides the per-build share. GOMAXPROCS is a fallback |
Without a write override, sloptor uses 8 output-write workers. Positive fractional overrides round down. Sloptor skips values it can't parse and uses the next setting or the default. UV_THREADPOOL_SIZE can still change the Node sidecar's libuv pool, but it doesn't change sloptor's write workers.
Build slots
Section titled “Build slots”Rust has no garbage collector, so there is no GOGC or GOMEMLIMIT. Each build instead takes one of a few machine-wide build slots, one per 6 GiB of memory and at most one per two CPUs. Concurrent builds, such as an nx run or a CI matrix, split the machine. ROTOR_MAX_BUILDS changes the slot count, and 0 turns the queue off. The build's share sizes the checker worker pool and the Node sidecar's shard count. RAYON_NUM_THREADS overrides the pool size. Lower --checkers and --builders counts reduce live compiler state when memory is tight.