Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Runtime behavior

Each package runs in a separate QuickJS-NG runtime and context.

Safe mode

Safe mode applies:

  • 32 MiB QuickJS heap limit per package
  • 512 KiB QuickJS stack limit per package
  • 50 ms startup execution deadline
  • 10 ms shutdown execution deadline
  • Blocking operations disabled
  • fumo:ffi unavailable

Insecure mode

Insecure mode changes runtime creation:

  • No QuickJS heap limit is installed
  • No QuickJS maximum stack size is installed
  • Blocking operations are allowed
  • fumo:ffi may load for packages requesting the capability

Execution deadlines and module source-size validation remain active. The setting causes packages to reload so existing runtimes cannot retain the previous security profile.

Module evaluation

Entry files are compiled as ES modules. Top-level promises are pumped during startup and must settle before the startup budget expires. An exported shutdown function is called when the package is disabled, reloaded, or the engine stops.

Unhandled promise rejections are written to the package console.

Enabled state

Newly discovered packages start disabled. The Scripts workspace writes every toggle immediately to:

%APPDATA%\FumowareV2\script-states.cfg

This state is independent of Fumoware configs and is restored on the next injection. It is flushed again during a normal engine shutdown.

Host object lifetime

Game data and trace results are copied values. A UserCommand is valid only while its own createMove callback is running. It expires before Promise jobs or microtasks execute, so retaining one cannot mutate a later command.

Async work

HTTP runs on cancellable native workers and settles Promises on the script owner lane. Unloading a package cancels and joins its requests before destroying QuickJS.