virtual-machine 0.1.4 → 0.1.5

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,17 +206,17 @@ if (!("encodeInto" in cachedTextEncoder)) {
206
206
  };
207
207
  }
208
208
  var WASM_VECTOR_LEN = 0;
209
- function wasm_bindgen__convert__closures_____invoke__h02b024c830faf3c0(arg0, arg1, arg2) {
210
- wasm.wasm_bindgen__convert__closures_____invoke__h02b024c830faf3c0(arg0, arg1, arg2);
209
+ function wasm_bindgen__convert__closures_____invoke__h585740b37ab67ddc(arg0, arg1) {
210
+ wasm.wasm_bindgen__convert__closures_____invoke__h585740b37ab67ddc(arg0, arg1);
211
211
  }
212
212
  function wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765(arg0, arg1, arg2) {
213
213
  wasm.wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765(arg0, arg1, arg2);
214
214
  }
215
- function wasm_bindgen__convert__closures_____invoke__h9493c87185cf2d12(arg0, arg1) {
216
- wasm.wasm_bindgen__convert__closures_____invoke__h9493c87185cf2d12(arg0, arg1);
215
+ function wasm_bindgen__convert__closures_____invoke__hc7b58d5dcf05d71f(arg0, arg1, arg2) {
216
+ wasm.wasm_bindgen__convert__closures_____invoke__hc7b58d5dcf05d71f(arg0, arg1, arg2);
217
217
  }
218
- function wasm_bindgen__convert__closures_____invoke__hec486a7a364d96de(arg0, arg1) {
219
- wasm.wasm_bindgen__convert__closures_____invoke__hec486a7a364d96de(arg0, arg1);
218
+ function wasm_bindgen__convert__closures_____invoke__he5e8d2a2af985b7e(arg0, arg1) {
219
+ wasm.wasm_bindgen__convert__closures_____invoke__he5e8d2a2af985b7e(arg0, arg1);
220
220
  }
221
221
  var __wbindgen_enum_WorkerType = ["classic", "module"];
222
222
  var WasmVmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
@@ -280,6 +280,22 @@ var WasmVm = class _WasmVm {
280
280
  const len0 = WASM_VECTOR_LEN;
281
281
  wasm.wasmvm_print_status(this.__wbg_ptr, ptr0, len0);
282
282
  }
283
+ /**
284
+ * Get CPU count (from kernel-reported value).
285
+ * @returns {number}
286
+ */
287
+ get_cpu_count() {
288
+ const ret = wasm.wasmvm_get_cpu_count(this.__wbg_ptr);
289
+ return ret >>> 0;
290
+ }
291
+ /**
292
+ * Get system uptime in milliseconds (from kernel-reported value).
293
+ * @returns {bigint}
294
+ */
295
+ get_uptime_ms() {
296
+ const ret = wasm.wasmvm_get_uptime_ms(this.__wbg_ptr);
297
+ return BigInt.asUintN(64, ret);
298
+ }
283
299
  /**
284
300
  * Start worker threads for secondary harts (1..num_harts).
285
301
  *
@@ -298,6 +314,24 @@ var WasmVm = class _WasmVm {
298
314
  throw takeFromExternrefTable0(ret[0]);
299
315
  }
300
316
  }
317
+ /**
318
+ * Get disk usage from the guest kernel.
319
+ * Returns (used_bytes, total_bytes).
320
+ * @returns {Array<any>}
321
+ */
322
+ get_disk_usage() {
323
+ const ret = wasm.wasmvm_get_disk_usage(this.__wbg_ptr);
324
+ return ret;
325
+ }
326
+ /**
327
+ * Get heap memory usage from the guest kernel.
328
+ * Returns (used_bytes, total_bytes).
329
+ * @returns {Array<any>}
330
+ */
331
+ get_heap_usage() {
332
+ const ret = wasm.wasmvm_get_heap_usage(this.__wbg_ptr);
333
+ return ret;
334
+ }
301
335
  /**
302
336
  * Get the current network connection status.
303
337
  * This checks the actual connection state by seeing if an IP was assigned.
@@ -334,6 +368,15 @@ var WasmVm = class _WasmVm {
334
368
  const ret = wasm.wasmvm_get_memory_usage(this.__wbg_ptr);
335
369
  return BigInt.asUintN(64, ret);
336
370
  }
371
+ /**
372
+ * Get the total disk capacity from attached VirtIO block devices.
373
+ * Returns total bytes across all block devices.
374
+ * @returns {bigint}
375
+ */
376
+ get_disk_capacity() {
377
+ const ret = wasm.wasmvm_get_disk_capacity(this.__wbg_ptr);
378
+ return BigInt.asUintN(64, ret);
379
+ }
337
380
  /**
338
381
  * Get the SharedArrayBuffer for external worker management.
339
382
  * Returns None if not in SMP mode.
@@ -1067,7 +1110,7 @@ function __wbg_get_imports() {
1067
1110
  }, arguments);
1068
1111
  };
1069
1112
  imports.wbg.__wbindgen_cast_1b00663567edb453 = function(arg0, arg1) {
1070
- const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h6be55d916a7a567c, wasm_bindgen__convert__closures_____invoke__h9493c87185cf2d12);
1113
+ const ret = makeClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h37d1b5fcb52cb1b9, wasm_bindgen__convert__closures_____invoke__h585740b37ab67ddc);
1071
1114
  return ret;
1072
1115
  };
1073
1116
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
@@ -1078,12 +1121,12 @@ function __wbg_get_imports() {
1078
1121
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf225e18fc5ab9bc1, wasm_bindgen__convert__closures_____invoke__h39d3e89751b07765);
1079
1122
  return ret;
1080
1123
  };
1081
- imports.wbg.__wbindgen_cast_a93ea42108a71f00 = function(arg0, arg1) {
1082
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h6be55d916a7a567c, wasm_bindgen__convert__closures_____invoke__h02b024c830faf3c0);
1124
+ imports.wbg.__wbindgen_cast_614f6ca309748622 = function(arg0, arg1) {
1125
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h37d1b5fcb52cb1b9, wasm_bindgen__convert__closures_____invoke__he5e8d2a2af985b7e);
1083
1126
  return ret;
1084
1127
  };
1085
- imports.wbg.__wbindgen_cast_af54cb5d64a8cc15 = function(arg0, arg1) {
1086
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h6be55d916a7a567c, wasm_bindgen__convert__closures_____invoke__hec486a7a364d96de);
1128
+ imports.wbg.__wbindgen_cast_bda31cc20c54b248 = function(arg0, arg1) {
1129
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h37d1b5fcb52cb1b9, wasm_bindgen__convert__closures_____invoke__hc7b58d5dcf05d71f);
1087
1130
  return ret;
1088
1131
  };
1089
1132
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {