Files
seddonm1-quickjs/README.md

1.2 KiB

This repository demonstrates how to use quickjs-wasm-rs with wasmtime to easily build a safe and isolated plugin system for Rust.

Code to accompany blog post: https://reorchestrate.com/posts/plugins-for-rust

First build-wasm.sh script which will download and build the quickjs.wasm module.

Examples

Run a sequential executor:

cargo run --example iter --release

Run a parallel executor:

cargo run --example par_iter --release

Both accept additional arguments like:

cargo run --release --example iter -- \
--module ./quickjs.wasm \
--script ./track_points.js \
--data ./track_points.json \
--iterations 1000 \
--inherit-stdout \
--inherit-stderr

Build

cargo build --package quickjs --release

Test

cargo test --package quickjs --release

Bench

cargo bench --package quickjs

Credits