Expand description
M3-B Phase B — rquickjs backend for super::XfaJsRuntime.
Compiled in only when the xfa-js-sandboxed Cargo feature is enabled.
This backend is intentionally minimal:
- No host bindings registered. Phase C adds the first useful ones per
benchmarks/runs/M3B_HOST_BINDINGS_MINIMUM_SET.md. Date.now,Math.random,fetch,require,processand friends are absent because they are never registered (rquickjs default contexts expose only spec-mandated ECMAScript built-ins).JS_SetMemoryLimitenforces the per-document memory budget; any allocation that pushes the runtime over the limit fails withsuper::SandboxError::OutOfMemory.- Per-script time budget is enforced with the rquickjs interrupt handler
that polls a wall-clock deadline;
eval_with_optionsbails out withsuper::SandboxError::Timeoutwhen the deadline elapses. - All FFI is wrapped in
std::panic::catch_unwindso a QuickJS panic never crosses into the parent flatten path (benchmarks/runs/M3B_RUNTIME_SECURITY_MODEL.md§1 S-17).
Structs§
- Quick
JsRuntime - QuickJS-backed runtime adapter. One instance is reusable across many
documents; callers MUST invoke
XfaJsRuntime::reset_for_new_documentat the start of each flatten.