virtual-machine 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{chunk-LELR6ANL.mjs → chunk-QLEPTS7N.mjs} +99 -15
- package/build/cli.js +155 -18
- package/build/index.d.ts +63 -8
- package/build/index.js +155 -18
- package/build/index.mjs +57 -4
- package/build/{riscv_vm-UU4XYFGM.mjs → riscv_vm-Y73VOGQ2.mjs} +5 -3
- package/build/worker.d.ts +35 -0
- package/build/worker.js +828 -0
- package/build/worker.mjs +54 -0
- package/package.json +13 -1
|
@@ -206,14 +206,14 @@ if (!("encodeInto" in cachedTextEncoder)) {
|
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
var WASM_VECTOR_LEN = 0;
|
|
209
|
-
function
|
|
210
|
-
wasm.
|
|
209
|
+
function wasm_bindgen__convert__closures_____invoke__hd26ce43761bab283(arg0, arg1) {
|
|
210
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hd26ce43761bab283(arg0, arg1);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
wasm.
|
|
212
|
+
function wasm_bindgen__convert__closures_____invoke__h05c4944ac285ac35(arg0, arg1) {
|
|
213
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h05c4944ac285ac35(arg0, arg1);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
wasm.
|
|
215
|
+
function wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765(arg0, arg1, arg2) {
|
|
216
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765(arg0, arg1, arg2);
|
|
217
217
|
}
|
|
218
218
|
var WasmVmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
219
219
|
}, unregister: () => {
|
|
@@ -327,7 +327,7 @@ var WasmVm = class {
|
|
|
327
327
|
return this;
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
330
|
-
* Execute
|
|
330
|
+
* Execute one instruction on each CPU (round-robin).
|
|
331
331
|
* Returns true if the VM is still running, false if halted.
|
|
332
332
|
* @returns {boolean}
|
|
333
333
|
*/
|
|
@@ -383,6 +383,9 @@ var WasmVm = class {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
if (Symbol.dispose) WasmVm.prototype[Symbol.dispose] = WasmVm.prototype.free;
|
|
386
|
+
function worker_entry(hart_id, shared_mem, entry_pc) {
|
|
387
|
+
wasm.worker_entry(hart_id, shared_mem, entry_pc);
|
|
388
|
+
}
|
|
386
389
|
var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
387
390
|
async function __wbg_load(module, imports) {
|
|
388
391
|
if (typeof Response === "function" && module instanceof Response) {
|
|
@@ -444,6 +447,10 @@ function __wbg_get_imports() {
|
|
|
444
447
|
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
445
448
|
arg0._wbg_cb_unref();
|
|
446
449
|
};
|
|
450
|
+
imports.wbg.__wbg_byteLength_05cd8538d8f5f592 = function(arg0) {
|
|
451
|
+
const ret = arg0.byteLength;
|
|
452
|
+
return ret;
|
|
453
|
+
};
|
|
447
454
|
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() {
|
|
448
455
|
return handleError(function(arg0, arg1, arg2) {
|
|
449
456
|
const ret = arg0.call(arg1, arg2);
|
|
@@ -480,10 +487,26 @@ function __wbg_get_imports() {
|
|
|
480
487
|
imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
|
|
481
488
|
console.error(arg0);
|
|
482
489
|
};
|
|
490
|
+
imports.wbg.__wbg_fill_508dd108a821ee20 = function(arg0, arg1, arg2, arg3) {
|
|
491
|
+
const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
492
|
+
return ret;
|
|
493
|
+
};
|
|
483
494
|
imports.wbg.__wbg_getReader_b6676f6d8b326942 = function(arg0) {
|
|
484
495
|
const ret = arg0.getReader();
|
|
485
496
|
return ret;
|
|
486
497
|
};
|
|
498
|
+
imports.wbg.__wbg_getUint16_cb7a6e659d68e5a6 = function(arg0, arg1, arg2) {
|
|
499
|
+
const ret = arg0.getUint16(arg1 >>> 0, arg2 !== 0);
|
|
500
|
+
return ret;
|
|
501
|
+
};
|
|
502
|
+
imports.wbg.__wbg_getUint32_d3b8478c9340d38b = function(arg0, arg1, arg2) {
|
|
503
|
+
const ret = arg0.getUint32(arg1 >>> 0, arg2 !== 0);
|
|
504
|
+
return ret;
|
|
505
|
+
};
|
|
506
|
+
imports.wbg.__wbg_getUint8_f42915a9262518eb = function(arg0, arg1) {
|
|
507
|
+
const ret = arg0.getUint8(arg1 >>> 0);
|
|
508
|
+
return ret;
|
|
509
|
+
};
|
|
487
510
|
imports.wbg.__wbg_getWriter_bbffb7cf601bec61 = function() {
|
|
488
511
|
return handleError(function(arg0) {
|
|
489
512
|
const ret = arg0.getWriter();
|
|
@@ -496,13 +519,37 @@ function __wbg_get_imports() {
|
|
|
496
519
|
return ret;
|
|
497
520
|
}, arguments);
|
|
498
521
|
};
|
|
522
|
+
imports.wbg.__wbg_hardwareConcurrency_11023a850a093b20 = function(arg0) {
|
|
523
|
+
const ret = arg0.hardwareConcurrency;
|
|
524
|
+
return ret;
|
|
525
|
+
};
|
|
526
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
527
|
+
let result;
|
|
528
|
+
try {
|
|
529
|
+
result = arg0 instanceof Window;
|
|
530
|
+
} catch (_) {
|
|
531
|
+
result = false;
|
|
532
|
+
}
|
|
533
|
+
const ret = result;
|
|
534
|
+
return ret;
|
|
535
|
+
};
|
|
499
536
|
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
500
537
|
const ret = arg0.length;
|
|
501
538
|
return ret;
|
|
502
539
|
};
|
|
540
|
+
imports.wbg.__wbg_load_f1dd26e734971d92 = function() {
|
|
541
|
+
return handleError(function(arg0, arg1) {
|
|
542
|
+
const ret = Atomics.load(arg0, arg1 >>> 0);
|
|
543
|
+
return ret;
|
|
544
|
+
}, arguments);
|
|
545
|
+
};
|
|
503
546
|
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
504
547
|
console.log(arg0);
|
|
505
548
|
};
|
|
549
|
+
imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
|
|
550
|
+
const ret = arg0.navigator;
|
|
551
|
+
return ret;
|
|
552
|
+
};
|
|
506
553
|
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
507
554
|
const ret = new Object();
|
|
508
555
|
return ret;
|
|
@@ -519,6 +566,14 @@ function __wbg_get_imports() {
|
|
|
519
566
|
const ret = new Error();
|
|
520
567
|
return ret;
|
|
521
568
|
};
|
|
569
|
+
imports.wbg.__wbg_new_ab1fe2437c86d873 = function(arg0) {
|
|
570
|
+
const ret = new SharedArrayBuffer(arg0 >>> 0);
|
|
571
|
+
return ret;
|
|
572
|
+
};
|
|
573
|
+
imports.wbg.__wbg_new_de1e660b88fc921f = function(arg0) {
|
|
574
|
+
const ret = new Int32Array(arg0);
|
|
575
|
+
return ret;
|
|
576
|
+
};
|
|
522
577
|
imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
523
578
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
524
579
|
return ret;
|
|
@@ -533,6 +588,16 @@ function __wbg_get_imports() {
|
|
|
533
588
|
return ret;
|
|
534
589
|
}, arguments);
|
|
535
590
|
};
|
|
591
|
+
imports.wbg.__wbg_new_with_shared_array_buffer_f801846979192910 = function(arg0, arg1, arg2) {
|
|
592
|
+
const ret = new DataView(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
593
|
+
return ret;
|
|
594
|
+
};
|
|
595
|
+
imports.wbg.__wbg_notify_f7e901980222d3e0 = function() {
|
|
596
|
+
return handleError(function(arg0, arg1) {
|
|
597
|
+
const ret = Atomics.notify(arg0, arg1 >>> 0);
|
|
598
|
+
return ret;
|
|
599
|
+
}, arguments);
|
|
600
|
+
};
|
|
536
601
|
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
537
602
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
538
603
|
};
|
|
@@ -567,9 +632,21 @@ function __wbg_get_imports() {
|
|
|
567
632
|
const ret = Promise.resolve(arg0);
|
|
568
633
|
return ret;
|
|
569
634
|
};
|
|
635
|
+
imports.wbg.__wbg_setUint16_ff3205ca61800a91 = function(arg0, arg1, arg2, arg3) {
|
|
636
|
+
arg0.setUint16(arg1 >>> 0, arg2, arg3 !== 0);
|
|
637
|
+
};
|
|
638
|
+
imports.wbg.__wbg_setUint32_3590d6adecfd0c9a = function(arg0, arg1, arg2, arg3) {
|
|
639
|
+
arg0.setUint32(arg1 >>> 0, arg2 >>> 0, arg3 !== 0);
|
|
640
|
+
};
|
|
641
|
+
imports.wbg.__wbg_setUint8_71dd48d3e18e4e40 = function(arg0, arg1, arg2) {
|
|
642
|
+
arg0.setUint8(arg1 >>> 0, arg2);
|
|
643
|
+
};
|
|
570
644
|
imports.wbg.__wbg_set_algorithm_f5b9d6dae15e63e3 = function(arg0, arg1, arg2) {
|
|
571
645
|
arg0.algorithm = getStringFromWasm0(arg1, arg2);
|
|
572
646
|
};
|
|
647
|
+
imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
|
|
648
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
649
|
+
};
|
|
573
650
|
imports.wbg.__wbg_set_server_certificate_hashes_d12c95e03a45bcd5 = function(arg0, arg1) {
|
|
574
651
|
arg0.serverCertificateHashes = arg1;
|
|
575
652
|
};
|
|
@@ -599,6 +676,12 @@ function __wbg_get_imports() {
|
|
|
599
676
|
const ret = typeof window === "undefined" ? null : window;
|
|
600
677
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
601
678
|
};
|
|
679
|
+
imports.wbg.__wbg_store_9f60a65541866026 = function() {
|
|
680
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
681
|
+
const ret = Atomics.store(arg0, arg1 >>> 0, arg2);
|
|
682
|
+
return ret;
|
|
683
|
+
}, arguments);
|
|
684
|
+
};
|
|
602
685
|
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
603
686
|
const ret = arg0.then(arg1, arg2);
|
|
604
687
|
return ret;
|
|
@@ -618,26 +701,26 @@ function __wbg_get_imports() {
|
|
|
618
701
|
const ret = arg0.write(arg1);
|
|
619
702
|
return ret;
|
|
620
703
|
};
|
|
704
|
+
imports.wbg.__wbindgen_cast_0268c24e8eb79d38 = function(arg0, arg1) {
|
|
705
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04a8b4d76d4f17bc, wasm_bindgen__convert__closures_____invoke__hd26ce43761bab283);
|
|
706
|
+
return ret;
|
|
707
|
+
};
|
|
621
708
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
622
709
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
623
710
|
return ret;
|
|
624
711
|
};
|
|
625
|
-
imports.wbg.
|
|
626
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
712
|
+
imports.wbg.__wbindgen_cast_4ee4ae87c307a33c = function(arg0, arg1) {
|
|
713
|
+
const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04a8b4d76d4f17bc, wasm_bindgen__convert__closures_____invoke__h05c4944ac285ac35);
|
|
627
714
|
return ret;
|
|
628
715
|
};
|
|
629
|
-
imports.wbg.
|
|
630
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
716
|
+
imports.wbg.__wbindgen_cast_d0201660226fd4b0 = function(arg0, arg1) {
|
|
717
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf225e18fc5ab9bc1, wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765);
|
|
631
718
|
return ret;
|
|
632
719
|
};
|
|
633
720
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
634
721
|
const ret = arg0;
|
|
635
722
|
return ret;
|
|
636
723
|
};
|
|
637
|
-
imports.wbg.__wbindgen_cast_d7af7bed1611c5d8 = function(arg0, arg1) {
|
|
638
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hcbebb3eac6bc054d, wasm_bindgen__convert__closures_____invoke__hd4872e8b3188af0e);
|
|
639
|
-
return ret;
|
|
640
|
-
};
|
|
641
724
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
642
725
|
const table = wasm.__wbindgen_externrefs;
|
|
643
726
|
const offset = table.grow(4);
|
|
@@ -694,6 +777,7 @@ var riscv_vm_default = __wbg_init;
|
|
|
694
777
|
export {
|
|
695
778
|
NetworkStatus,
|
|
696
779
|
WasmVm,
|
|
780
|
+
worker_entry,
|
|
697
781
|
initSync,
|
|
698
782
|
riscv_vm_default
|
|
699
783
|
};
|