mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
p2 (Pi Mobile on Chord v2) moves from pi-private into pi as one commit. Root scripts that loop all workspaces use --if-present; npm test, ./test.sh and the release script cover packages/* only (p2: cd apps/p2 && npm test); sync-versions also updates apps' workspace pins.
15 lines
853 B
TypeScript
15 lines
853 B
TypeScript
import { local } from "@p2/app/v1";
|
|
|
|
/**
|
|
* Heap cap of each script's QuickJS VM. Keep it constant across restarts: the limit is part of the VM's fingerprint,
|
|
* which Durable records when a script starts, and a script interrupted by a restart resumes only on a VM with the same
|
|
* fingerprint. A changed limit makes every interrupted script end with "the sandbox changed" instead of resuming.
|
|
*/
|
|
export const CODEMODE_MEMORY_LIMIT_BYTES = 256 * 1024 * 1024;
|
|
|
|
/**
|
|
* The worker's code mode sandbox (host-internal): one per worker, closed when the plugin is removed or the worker
|
|
* stops; a reload opens a new one and drains the old one in the background (its scripts run on). Each running script
|
|
* holds one worker thread; closing aborts them.
|
|
*/
|
|
export const CodemodeRuntime = local("p2.codemode-runtime", { version: 2, params: {}, members: {} });
|