All Projects → wasm3 → node-wasm-run

wasm3 / node-wasm-run

Licence: MIT license
Run arbitrary WASM/WASI files

Programming Languages

javascript
184084 projects - #8 most used programming language
WebAssembly
147 projects

Projects that are alternatives of or similar to node-wasm-run

Crystdb
CrystDB is a thread-safe and convenient Object Relational Mapping database that based on SQLite.
Stars: ✭ 146 (+124.62%)
Mutual labels:  runtime
Aesthetic
[DEPRECATED]
Stars: ✭ 2,044 (+3044.62%)
Mutual labels:  runtime
Golang Notes
Go source code analysis(zh-cn)
Stars: ✭ 3,137 (+4726.15%)
Mutual labels:  runtime
One
On-device Neural Engine
Stars: ✭ 162 (+149.23%)
Mutual labels:  runtime
Coreclr
CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes.
Stars: ✭ 12,610 (+19300%)
Mutual labels:  runtime
Swiftdb
A modern database abstraction layer, batteries included.
Stars: ✭ 183 (+181.54%)
Mutual labels:  runtime
Swizzleswift
Swizzle selectors with just one clean and elegant API
Stars: ✭ 140 (+115.38%)
Mutual labels:  runtime
Wasmtime Go
Go WebAssembly runtime powered by Wasmtime
Stars: ✭ 239 (+267.69%)
Mutual labels:  runtime
Smol
A small and fast async runtime for Rust
Stars: ✭ 2,206 (+3293.85%)
Mutual labels:  runtime
Computed Types
🦩 Joi like validations for TypeScript
Stars: ✭ 197 (+203.08%)
Mutual labels:  runtime
Zap
An asynchronous runtime with a focus on performance and resource efficiency.
Stars: ✭ 162 (+149.23%)
Mutual labels:  runtime
Raj
The Elm Architecture for JavaScript
Stars: ✭ 169 (+160%)
Mutual labels:  runtime
Csmodel
CSModel is a concise and efficient model framework for iOS/OSX, and provides nested Model to compare values and copy values.
Stars: ✭ 192 (+195.38%)
Mutual labels:  runtime
Inline Manifest Webpack Plugin
inline your webpack manifest (runtime code) with a script tag to save http request
Stars: ✭ 157 (+141.54%)
Mutual labels:  runtime
Harmony
A library for patching, replacing and decorating .NET and Mono methods during runtime
Stars: ✭ 2,885 (+4338.46%)
Mutual labels:  runtime
Rapidgui
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
Stars: ✭ 144 (+121.54%)
Mutual labels:  runtime
Colorful
Android runtime theme library
Stars: ✭ 2,091 (+3116.92%)
Mutual labels:  runtime
Node
Node.js JavaScript runtime ✨🐢🚀✨
Stars: ✭ 83,731 (+128716.92%)
Mutual labels:  runtime
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+4210.77%)
Mutual labels:  runtime
Elsa
❄️ Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go
Stars: ✭ 2,461 (+3686.15%)
Mutual labels:  runtime

SWUbanner

wasm-run

Run arbitrary WASM/WASI files

NPM version GitHub stars GitHub issues GitHub license

Installation

$ npm install wasm-run -g

Usage

$ wasm-run --help        
wasm-run [options] <file> [--] [args..]

Options:
  -i, --invoke     Function to execute  [string]
  -t, --timeout    Execution timeout (ms)
      --trace      Trace imported function calls  [boolean]
      --gas-limit  Gas limit  [default: 100000]
      --version    Show version number  [boolean]
      --help       Show help  [boolean]

Run a single exported function

$ wasm-run ./test/fib32.wasm 32
[runtime] Running fib(32)...
[runtime] Result: 2178309

WAT file with multivalue support

$ wasm-run --invoke=swap_i64 ./test/swap.wat 10 12
[runtime] Converted to binary (256 bytes)
[runtime] Running swap_i64(10,12)...
[runtime] Result: 12,10

WASI support

$ wasm-run wasi-hello-world.wasm
Hello world!

Imported function tracing

$ wasm-run --trace wasi-hello-world.wasm
[runtime] wasi_snapshot_preview1!fd_prestat_get 3,65528 => 0
[runtime] wasi_snapshot_preview1!fd_prestat_dir_name 3,70064,2 => 0
[runtime] wasi_snapshot_preview1!fd_prestat_get 4,65528 => 0
[runtime] wasi_snapshot_preview1!fd_prestat_dir_name 4,70064,2 => 0
...

Gas metering/limiting

wasm-meter can be installed via npm install wasm-metering -g

$ wasm-meter fib64.wasm fib64.metered.wasm
$ wasm-run fib64.metered.wasm 8
[runtime] Running fib(8)...
[runtime] Result: 21
[runtime] Gas used: 5.1874
$ wasm-run fib64.metered.wasm 30
[runtime] Running fib(30)...
[runtime] Error: Run out of gas (gas used: 100000.0177)

Features

Load wasm and wat files (using Binaryen)
Run specific exported function
Run wasi-snapshot-preview1 apps via --experimental-wasi-unstable-preview1 flag
Run wasi-unstable apps (compatibility layer)
i64 args, multi-value, bulk-memory, tail-calls support via experimental flags
Generic imports tracing
Gas metering/limiting
☐ Compiled wasm caching (blocked by #1)
☐ WASI API and structures decoding (generate from witx?)
☐ REPL mode

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].