temeddix / jco-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jco-test

Get the system ready.

rustup target add wasm32-wasi
cargo install cargo-component
npm install

Run locally on NodeJS.

cargo component build
npx jco transpile target/wasm32-wasi/debug/jco_test.wasm -o nodejs/out_dir
node nodejs/main.js

Serve for browsers.

cargo component build
npx jco transpile target/wasm32-wasi/debug/jco_test.wasm -o browser/out_dir --no-nodejs-compat
node server.js

Run as a native executable. Uncomment the [[bin]] section in Cargo.toml file first.

cargo run

Other commands.

npx jco wit target/wasm32-wasi/debug/jco_test.wasm

About

License:MIT License


Languages

Language:JavaScript 89.9%Language:Rust 8.4%Language:HTML 1.7%