Skip to content

v0.6.3

Choose a tag to compare

@mavdol mavdol released this 02 Mar 11:03
· 192 commits to main since this release
08daeb9

Direct Execution

This release introduces direct execution of pre-compiled WebAssembly artifacts, allowing you to skip compilation entirely.

What's New

capsule exec sandbox.wasm

Use capsule build --export to copy the compiled artifact to your source directory, then execute it directly anytime without recompiling.

capsule build sandbox.py --export   # ~5s (one-time compilation, exports ./sandbox.wasm)
capsule exec sandbox.wasm           # ~5ms
capsule exec sandbox.wasm           # ~5ms
capsule exec sandbox.wasm           # ~5ms

Capsule will automatically precompile the .wasm into an optimized native .cwasm.

SDK Update

The run() function in both the Python and JavaScript SDKs now automatically dispatches to the right command based on the file extension — source files go through capsule run, artifact files go through capsule exec. The API shape is unchanged.

# Python
await run(file="./sandbox.py", arg=[])       # compiles then executes
await run(file="./sandbox.wasm", arg=[])     # executes directly, no compilation
// TypeScript
await run({ file: './sandbox.ts', arg:[] });    // compiles then executes
await run({ file: './sandbox.wasm', arg:[] }); // executes directly, no compilation

Note
Direct execution is available for both Python and TypeScript artifacts.