glassjar 0.2.0 → 0.3.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/README.md +5 -1
- package/dist/assets/worker-uZ245g5u.js +1112 -0
- package/dist/engine_bg.wasm +0 -0
- package/dist/glassjar.js +265 -258
- package/dist/glassjar.umd.cjs +2 -2
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/assets/worker-BCwwQmAD.js +0 -1112
package/README.md
CHANGED
|
@@ -73,7 +73,11 @@ notices and payload provenance are in `share/licenses/cpp-exceptions/` inside
|
|
|
73
73
|
## Full API
|
|
74
74
|
|
|
75
75
|
```ts
|
|
76
|
-
const engine = await Engine.create('c'); // 'c' | 'python'
|
|
76
|
+
const engine = await Engine.create('c'); // 'c' | 'python' | 'rust'
|
|
77
|
+
// The worker and its compiled compilers stay alive between runs (each run still gets a
|
|
78
|
+
// fresh instance, memory and filesystem) until idle for idleTimeoutMs (default 30 s).
|
|
79
|
+
// Errors, Debug runs and stop() replace it. Opt out with { retainWorker: false }.
|
|
80
|
+
await Engine.create('python', { retainWorker: true, idleTimeoutMs: 30_000 });
|
|
77
81
|
|
|
78
82
|
engine.fs; // DirNode — virtual filesystem, set before run()
|
|
79
83
|
engine.binaryFiles; // Record<string, Uint8Array> — optional C/C++ binary files
|