virtual-machine 0.0.24 → 0.0.25

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.
@@ -206,14 +206,14 @@ if (!("encodeInto" in cachedTextEncoder)) {
206
206
  };
207
207
  }
208
208
  var WASM_VECTOR_LEN = 0;
209
- function wasm_bindgen__convert__closures_____invoke__hfd5f343960464841(arg0, arg1) {
210
- wasm.wasm_bindgen__convert__closures_____invoke__hfd5f343960464841(arg0, arg1);
209
+ function wasm_bindgen__convert__closures_____invoke__hcb213e7f52b31168(arg0, arg1) {
210
+ wasm.wasm_bindgen__convert__closures_____invoke__hcb213e7f52b31168(arg0, arg1);
211
211
  }
212
212
  function wasm_bindgen__convert__closures_____invoke__h6709295d3f31b919(arg0, arg1, arg2) {
213
213
  wasm.wasm_bindgen__convert__closures_____invoke__h6709295d3f31b919(arg0, arg1, arg2);
214
214
  }
215
- function wasm_bindgen__convert__closures_____invoke__h7c611e26ba1ee3d4(arg0, arg1) {
216
- wasm.wasm_bindgen__convert__closures_____invoke__h7c611e26ba1ee3d4(arg0, arg1);
215
+ function wasm_bindgen__convert__closures_____invoke__hb7783920f48cbf0e(arg0, arg1) {
216
+ wasm.wasm_bindgen__convert__closures_____invoke__hb7783920f48cbf0e(arg0, arg1);
217
217
  }
218
218
  var WasmVmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
219
219
  }, unregister: () => {
@@ -247,6 +247,22 @@ var WasmVm = class {
247
247
  const ret = wasm.wasmvm_get_output(this.__wbg_ptr);
248
248
  return ret === 16777215 ? void 0 : ret;
249
249
  }
250
+ /**
251
+ * Print the VM banner to UART output (visible in browser).
252
+ * Call this after creating the VM to show a boot banner.
253
+ */
254
+ print_banner() {
255
+ wasm.wasmvm_print_banner(this.__wbg_ptr);
256
+ }
257
+ /**
258
+ * Print a status message to UART output (visible in browser).
259
+ * @param {string} message
260
+ */
261
+ print_status(message) {
262
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
263
+ const len0 = WASM_VECTOR_LEN;
264
+ wasm.wasmvm_print_status(this.__wbg_ptr, ptr0, len0);
265
+ }
250
266
  /**
251
267
  * Get the current network connection status.
252
268
  * This checks the actual connection state by seeing if an IP was assigned.
@@ -270,6 +286,15 @@ var WasmVm = class {
270
286
  disconnect_network() {
271
287
  wasm.wasmvm_disconnect_network(this.__wbg_ptr);
272
288
  }
289
+ /**
290
+ * Check how many bytes are pending in the UART output buffer.
291
+ * Useful for debugging output issues.
292
+ * @returns {number}
293
+ */
294
+ uart_output_pending() {
295
+ const ret = wasm.wasmvm_uart_output_pending(this.__wbg_ptr);
296
+ return ret >>> 0;
297
+ }
273
298
  /**
274
299
  * Connect to a WebTransport relay server.
275
300
  * Note: Connection is asynchronous. Check network_status() to monitor connection state.
@@ -570,6 +595,9 @@ function __wbg_get_imports() {
570
595
  const ret = arg0.then(arg1);
571
596
  return ret;
572
597
  };
598
+ imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
599
+ console.warn(arg0);
600
+ };
573
601
  imports.wbg.__wbg_writable_523e68bd72433329 = function(arg0) {
574
602
  const ret = arg0.writable;
575
603
  return ret;
@@ -582,22 +610,22 @@ function __wbg_get_imports() {
582
610
  const ret = getStringFromWasm0(arg0, arg1);
583
611
  return ret;
584
612
  };
585
- imports.wbg.__wbindgen_cast_22b48c66901f03d5 = function(arg0, arg1) {
586
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb099e2ae98169675, wasm_bindgen__convert__closures_____invoke__h6709295d3f31b919);
587
- return ret;
588
- };
589
- imports.wbg.__wbindgen_cast_3dba8e634cba348f = function(arg0, arg1) {
590
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1c3a9ff1d3f255ed, wasm_bindgen__convert__closures_____invoke__h7c611e26ba1ee3d4);
613
+ imports.wbg.__wbindgen_cast_7e4d67645914f495 = function(arg0, arg1) {
614
+ const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__ha64c5484eb0bd270, wasm_bindgen__convert__closures_____invoke__hb7783920f48cbf0e);
591
615
  return ret;
592
616
  };
593
- imports.wbg.__wbindgen_cast_8184f83d0f362634 = function(arg0, arg1) {
594
- const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1c3a9ff1d3f255ed, wasm_bindgen__convert__closures_____invoke__hfd5f343960464841);
617
+ imports.wbg.__wbindgen_cast_9d58885f229d7092 = function(arg0, arg1) {
618
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb099e2ae98169675, wasm_bindgen__convert__closures_____invoke__h6709295d3f31b919);
595
619
  return ret;
596
620
  };
597
621
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
598
622
  const ret = arg0;
599
623
  return ret;
600
624
  };
625
+ imports.wbg.__wbindgen_cast_f93a3e825c4a0341 = function(arg0, arg1) {
626
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__ha64c5484eb0bd270, wasm_bindgen__convert__closures_____invoke__hcb213e7f52b31168);
627
+ return ret;
628
+ };
601
629
  imports.wbg.__wbindgen_init_externref_table = function() {
602
630
  const table = wasm.__wbindgen_externrefs;
603
631
  const offset = table.grow(4);