Skip to content

andreiltd/componentize-qjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

componentize-js but worse

The runtime is based on quickjs through rquickjs, a small embeddable JavaScript engine.

This is largely based on https://github.com/alexcrichton/lua-component-demo and https://github.com/dicej/componentize-js

Prerequisites

Building currently requires a nightly Rust toolchain because it relies on the wasi-libc being compiled with -fPIC.

Usage

# Build a component
cargo +nightly run --release -- --wit examples/hello.wit --js examples/hello.js -o hello.wasm

# Build with optimize-size feature for smaller output (~750KB for the hello component)
cargo +nightly run --release --features optimize-size -- --wit examples/hello.wit --js examples/hello.js -o hello.wasm

# Run with wasmtime
wasmtime run --invoke 'greet("World")' hello.wasm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published