duktape - wapm
Wapm logo
search

The search results will appear here

duktapeWASI

0.0.3 Public • Published 9 days ago800.12 KB

Duktape is an embeddable JavaScript engine, with a focus on portability and compact footprint.

Copy and paste to install this package
wapm install duktape

homeHomepage

launchGithub (grade - call_split - error_outline - open issues/PRs)

Duktape

Duktape is an embeddable JavaScript engine, with a focus on portability and compact footprint.

Original Source: https://github.com/svaarala/duktape

Modifications: We made some changes to adapt the codebase to the WASI interface.

Running

With wasmer

Install it with:

wapm install -g duktape

Without any arguments a simple REPL will be launched.

# Run a file
duk --dir=. examples/hello_world.js

# Run the REPL
duk

With wasmtime

First build it by following the instructions in "Building".

# Run a file
wasmtime --dir examples/ build/duk.wasm -- examples/hello_world.js

# Run the REPL
wasmtime --dir . build/duk.wasm

Building

The following script will download the WASI SDK and build the WASM binary.

./build.sh