Now supporting wasmedge socket for HTTP requests and Tensorflow in JavaScript programs!
Install Rust and wasmedge CLI tool.
Make sure that you use the -e all option to install the WasmEdge Tensorflow extensions if you want to try the Tensorflow examples below.
rustup target add wasm32-wasi$ cargo build --target wasm32-wasi --release$ cd example_js
$ wasmedge --dir .:. ../target/wasm32-wasi/release/quickjs-rs-wasi.wasm hello.js WasmEdge Runtime$ cargo build --target wasm32-wasi --releaseBonus: This example also shows how to import another JavaScript file into the current program.
$ cd example_js
$ wasmedge --dir .:. ../target/wasm32-wasi/release/quickjs-rs-wasi.wasm http_demo.jsNote: Build the QuickJS interpreter with the WasmEdge Tensorflow extension.
$ cargo build --target wasm32-wasi --release --features=tensorflow$ cd example_js/tensorflow_lite_demo
$ wasmedge-tensorflow --dir .:. ../../target/wasm32-wasi/release/quickjs-rs-wasi.wasm main.jsIf you want to build a custom libquickjs.a to export some static c function.
See [quickjs-wasi]
run quickjs-wasi/lib/build.sh