second-state / wasmedge-quickjs

A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.
Apache License 2.0
477 stars 59 forks source link
javascript rust wasmedge webassembly

Run JavaScript in WebAssembly

Checkout the documentation

Quick start

git clone https://github.com/second-state/wasmedge-quickjs
cd wasmedge-quickjs

cargo build --target wasm32-wasi --release

wasmedge --dir .:. target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/hello.js WasmEdge Runtime
Hello WasmEdge Runtime

Usage with custom ssl certs

$  wasmedge --dir .:. --dir /etc/ssl:/etc/ssl:readonly --env SSL_CERT_FILE="/etc/ssl/cert.pem" target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/wasi_https_fetch.js

substitute the value of /etc/ssl and /etc/ssl/cert.pem with the location of your cert folder and cert file