feat(workspace): R2.4 core runtime — lazy load, poison on trap, offline re-instantiation, per-generation sheet handles
packages/core-wasm: browser-safe CoreRuntime (synchronous calls once ready; a WebAssembly.RuntimeError poisons the instance, the call answers internal, a fresh instance comes from the kept compiled module and a glue record imported in advance; at most 3 recoveries per page; retry after a load failure), SheetSession (handle rebuilt per instance generation, never called on a dropped one; invalid_sheet without poisoning), Node source. crates/wasm: SheetHandle (sheet held in the module memory). Two builds: pkg/ shipped without trap exports (checked), pkg-proofs/ for the trap tests; BUILD_STAMP (hash of the Rust sources) refused when missing or stale by the vitest global setup instead of skipping. Failure envelope carries a numeric found version; compact JS-number output.
This commit is contained in:
1 parent
22fea8736d
commit
343d6f4c1f
22 files changed
+783
-180
No files matched your search
@@ -10,10 +10,9 @@
|
||||
* (`memory access out of bounds`), deterministically;
|
||||
* - a genuinely new instance (new module record, new memory) recovers in full.
|
||||
*/
|
||||
import { loadCore } from '../src/index'
|
||||
import { coreBuilt } from './helpers/core'
|
||||
import { loadProofModule as loadCore } from '../src/node'
|
||||
|
||||
describe.skipIf(!coreBuilt)('panics and stack exhaustion (wasm)', () => {
|
||||
describe('panics and stack exhaustion (wasm)', () => {
|
||||
it('turns a panic into a WebAssembly.RuntimeError', async () => {
|
||||
const core = await loadCore()
|
||||
expect(() => core.panic_for_test()).toThrow(WebAssembly.RuntimeError)
|
||||
|
||||
Reference in new issue
Block a user