Environment variables

Operational flags for debugging and runtime behaviour.

Environment variables

Cascade reads a number of environment variables to adjust diagnostics, FFI behaviour and Tree‑sitter integration. Set these variables before launching your application to change its behaviour.

CASCADE_LOG_CRASH_REPORTS=1 bun run app.ts
CASCADE_SHOW_STATS=1 bun run app.ts
CASCADE_DEBUG_FFI=1 bun run app.ts
CASCADE_TREE_SITTER_WORKER_PATH=./parser.worker.ts bun run app.ts

CASCADE_LOG_CRASH_REPORTS writes crash reports to the console. CASCADE_SHOW_STATS prints frame timing and memory statistics. CASCADE_DEBUG_FFI enables verbose logging for the Zig FFI layer. CASCADE_TREE_SITTER_WORKER_PATH specifies the path to a custom Tree‑sitter worker script.

When debugging production issues, start with CASCADE_LOG_CRASH_REPORTS and CASCADE_SHOW_STATS. If you see rendering glitches or crashes around native calls, enable CASCADE_DEBUG_FFI to correlate the JS side with the Zig layer.