virtual-machine 0.4.2 → 0.5.0

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/index.d.ts CHANGED
@@ -366,6 +366,23 @@ declare class WasmVm {
366
366
  * This is the address where secondary harts should start executing.
367
367
  */
368
368
  entry_pc(): bigint;
369
+ /**
370
+ * Enable VirtIO 9P device for host directory mounting.
371
+ *
372
+ * This exposes a host directory to the guest kernel at the specified
373
+ * mount point. The JavaScript side must provide a `window.p9Host` object
374
+ * with the following methods:
375
+ * - `read(path)` - Returns Uint8Array of file contents
376
+ * - `write(path, data)` - Writes data to file, returns boolean
377
+ * - `readdir(path)` - Returns array of `{name, isDir}` objects
378
+ * - `exists(path)` - Returns boolean
379
+ * - `isDir(path)` - Returns boolean
380
+ *
381
+ * # Arguments
382
+ * * `host_path` - Path prefix for the host directory
383
+ * * `mount_tag` - Mount tag for guest to identify the mount
384
+ */
385
+ enable_9p(host_path: string, mount_tag: string): void;
369
386
  /**
370
387
  * Get the halt code if the VM has halted.
371
388
  * Code 0x5555 typically means successful shutdown (PASS).
@@ -483,6 +500,7 @@ interface InitOutput {
483
500
  readonly wasmvm_allow_workers_to_start: (a: number) => void;
484
501
  readonly wasmvm_connect_webtransport: (a: number, b: number, c: number, d: number, e: number) => [number, number];
485
502
  readonly wasmvm_disconnect_network: (a: number) => void;
503
+ readonly wasmvm_enable_9p: (a: number, b: number, c: number, d: number, e: number) => void;
486
504
  readonly wasmvm_enable_audio: (a: number) => void;
487
505
  readonly wasmvm_enable_emac: (a: number) => void;
488
506
  readonly wasmvm_enable_gpu: (a: number, b: number, c: number) => void;
@@ -544,12 +562,12 @@ interface InitOutput {
544
562
  readonly workerstate_step_batch: (a: number, b: number) => number;
545
563
  readonly workerstate_step_count: (a: number) => bigint;
546
564
  readonly worker_entry: (a: number, b: any, c: bigint) => void;
547
- readonly wasm_bindgen__convert__closures_____invoke__h8f8124f6febb822b: (a: number, b: number) => void;
548
- readonly wasm_bindgen__closure__destroy__h747faf247e91d978: (a: number, b: number) => void;
565
+ readonly wasm_bindgen__convert__closures_____invoke__hb64b0e492ba30db3: (a: number, b: number, c: any) => void;
566
+ readonly wasm_bindgen__closure__destroy__h75e3a518a3f3beb0: (a: number, b: number) => void;
567
+ readonly wasm_bindgen__convert__closures_____invoke__h18739833ac56d704: (a: number, b: number) => void;
568
+ readonly wasm_bindgen__convert__closures_____invoke__hba8efd9a01e74992: (a: number, b: number) => void;
549
569
  readonly wasm_bindgen__convert__closures_____invoke__h260170fb96639bcf: (a: number, b: number, c: any) => void;
550
570
  readonly wasm_bindgen__closure__destroy__h612f8e24953b61d5: (a: number, b: number) => void;
551
- readonly wasm_bindgen__convert__closures_____invoke__hdb5f2c9fdbbad746: (a: number, b: number) => void;
552
- readonly wasm_bindgen__convert__closures_____invoke__hc92ef0219c4477f2: (a: number, b: number, c: any) => void;
553
571
  readonly __wbindgen_malloc: (a: number, b: number) => number;
554
572
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
555
573
  readonly __wbindgen_exn_store: (a: number) => void;