smolmachines 1.31.0 → 1.32.2

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/dist/binding.d.ts CHANGED
@@ -182,6 +182,13 @@ export interface VmResourcesConfig {
182
182
  gpu?: boolean
183
183
  /** GPU VRAM in MiB (default: engine default when GPU is enabled). */
184
184
  gpuVramMib?: number
185
+ /**
186
+ * Disk durability: `"full"` (default), a guest flush waits for the host's
187
+ * disk; or `"deferred"`, guest writes reach the host's disk on the host's
188
+ * schedule, so fsync-heavy work (database commits) runs much faster and a
189
+ * host crash can lose recent writes.
190
+ */
191
+ diskDurability?: string
185
192
  /**
186
193
  * Run the guest's unmodified CUDA/PyTorch code on the host's NVIDIA GPU by
187
194
  * remoting CUDA calls over vsock (distinct from `gpu`, which is Vulkan; no
package/dist/native.d.ts CHANGED
@@ -42,6 +42,7 @@ export interface NativeResources {
42
42
  overlayGib?: number | undefined;
43
43
  gpu?: boolean | undefined;
44
44
  gpuVramMib?: number | undefined;
45
+ diskDurability?: "full" | "deferred" | undefined;
45
46
  cuda?: boolean | undefined;
46
47
  networkBackend?: string | undefined;
47
48
  }
package/dist/transport.js CHANGED
@@ -319,6 +319,7 @@ function toNativeConfig(name, config) {
319
319
  overlayGib: config.resources?.overlayGb,
320
320
  gpu: config.resources?.gpu,
321
321
  gpuVramMib: config.resources?.gpuVramMib,
322
+ diskDurability: config.resources?.diskDurability,
322
323
  cuda: config.resources?.cuda,
323
324
  networkBackend: config.resources?.networkBackend,
324
325
  }
@@ -1826,6 +1827,9 @@ async function makeTransport(config, conn) {
1826
1827
  ? { memoryMb: config.resources.memoryMb }
1827
1828
  : {}),
1828
1829
  diskGb: config.resources?.storageGb ?? null,
1830
+ ...(config.resources?.diskDurability !== undefined
1831
+ ? { diskDurability: config.resources.diskDurability }
1832
+ : {}),
1829
1833
  },
1830
1834
  ...(config.resources?.allowCidrs?.length ||
1831
1835
  config.resources?.allowHosts?.length
package/dist/types.d.ts CHANGED
@@ -41,6 +41,14 @@ export interface ResourceSpec {
41
41
  gpu?: boolean;
42
42
  /** GPU VRAM in MiB (default: engine default when GPU is enabled). Local target only. */
43
43
  gpuVramMib?: number;
44
+ /**
45
+ * Disk durability. `"full"` (default): a guest `fsync` waits for the host's
46
+ * disk. `"deferred"`: guest writes reach the host's disk on the host's
47
+ * schedule, so fsync-heavy work such as database commits runs far faster
48
+ * (Postgres commits about 19x on Linux), and a crash of the host, not of the
49
+ * machine, can lose the most recent writes. Local and cloud targets.
50
+ */
51
+ diskDurability?: "full" | "deferred";
44
52
  /**
45
53
  * Run the guest's unmodified CUDA/PyTorch code on the host's NVIDIA GPU by
46
54
  * remoting CUDA Driver-API calls over vsock (distinct from `gpu`, which is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smolmachines",
3
- "version": "1.31.0",
3
+ "version": "1.32.2",
4
4
  "description": "Embed isolated microVM sandboxes directly in your code — no server to run.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "smol-machines",
@@ -65,8 +65,8 @@
65
65
  "typescript": "^5.6.0"
66
66
  },
67
67
  "optionalDependencies": {
68
- "smolmachines-darwin-arm64": "1.31.0",
69
- "smolmachines-linux-x64-gnu": "1.31.0",
70
- "smolmachines-linux-arm64-gnu": "1.31.0"
68
+ "smolmachines-darwin-arm64": "1.32.2",
69
+ "smolmachines-linux-x64-gnu": "1.32.2",
70
+ "smolmachines-linux-arm64-gnu": "1.32.2"
71
71
  }
72
72
  }