All Projects → kanaka → warpy

kanaka / warpy

Licence: MPL-2.0 License
WebAssembly interpreter in RPython

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
WebAssembly
147 projects
Makefile
30231 projects

Projects that are alternatives of or similar to warpy

Wasm Micro Runtime
WebAssembly Micro Runtime (WAMR)
Stars: ✭ 2,440 (+4418.52%)
Mutual labels:  interpreter, webassembly, wasm, jit
Wasmjit
Small Embeddable WebAssembly Runtime
Stars: ✭ 1,063 (+1868.52%)
Mutual labels:  interpreter, webassembly, wasm, jit
Wasmtime
Standalone JIT-style runtime for WebAssembly, using Cranelift
Stars: ✭ 6,413 (+11775.93%)
Mutual labels:  webassembly, wasm, jit
swam
WebAssembly engine in Scala
Stars: ✭ 38 (-29.63%)
Mutual labels:  webassembly, wasm, wast
Rustpython
A Python Interpreter written in Rust
Stars: ✭ 10,261 (+18901.85%)
Mutual labels:  interpreter, wasm, jit
Winter
Haskell port of the WebAssembly OCaml reference interpreter
Stars: ✭ 42 (-22.22%)
Mutual labels:  interpreter, webassembly, wasm
Webassemblyjs
Toolchain for WebAssembly
Stars: ✭ 566 (+948.15%)
Mutual labels:  interpreter, webassembly, wasm
Wain
WebAssembly implementation from scratch in Safe Rust with zero dependencies
Stars: ✭ 160 (+196.3%)
Mutual labels:  interpreter, webassembly, wasm
Wasm Forth
A Forth implementation compiling to WebAssembly.
Stars: ✭ 92 (+70.37%)
Mutual labels:  interpreter, webassembly, wasm
Alchemyvm
WebAssembly Virtual Machine Built In Elixir
Stars: ✭ 176 (+225.93%)
Mutual labels:  interpreter, webassembly, wasm
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (+44.44%)
Mutual labels:  interpreter, jit, rpython
jasper
🧳 Single-binary packaging for Ruby applications that supports native and Wasm targets
Stars: ✭ 29 (-46.3%)
Mutual labels:  webassembly, wasm
wasmsign2
PoC implementation of the WebAssembly Modules Signatures proposal.
Stars: ✭ 18 (-66.67%)
Mutual labels:  webassembly, wasm
fullstack-rust
Reference implementation of a full-stack Rust application
Stars: ✭ 39 (-27.78%)
Mutual labels:  webassembly, wasm
vmrp
mrp emulator, virtual machine, mrp模拟器
Stars: ✭ 126 (+133.33%)
Mutual labels:  webassembly, wasm
wasm-linker-js
A simple WebAssembly Linker in JavaScript
Stars: ✭ 14 (-74.07%)
Mutual labels:  webassembly, wasm
imgalign
Webapplication for image stitching and aligning
Stars: ✭ 162 (+200%)
Mutual labels:  webassembly, wasm
rustwasmc
Tool for building Rust functions for Node.js. Combine the performance of Rust, safety and portability of WebAssembly, and ease of use of JavaScript.
Stars: ✭ 97 (+79.63%)
Mutual labels:  webassembly, wasm
gearoenix
Cross-platform C++ 3D game engine.
Stars: ✭ 33 (-38.89%)
Mutual labels:  webassembly, wasm
wazm
Web Assembly Zig Machine
Stars: ✭ 54 (+0%)
Mutual labels:  interpreter, wasm

warpy - WebAssembly in RPython

A WebAssembly interpreter written in RPython.

Warpy supports the WebAssembly MVP (minimum viable product) version of the spec.

Prerequisites

Build whe warpy executable. You will need a build of rpython on the path:

make warpy-jit   # or make warpy-nojit

Alternatively, you can use an rypthon docker container (built from Dockerfile-rpython) and do the compilation from there:

docker pull kanaka/warpy-rpython
docker run -it kanaka/warpy-rpython -v `pwd`:/build -w /build make warpy-jit

You will need wast2wasm to compile wast source to wasm bytecode. Check-out and build wabt (wabbit):

git clone --recursive https://github.com/WebAssembly/wabt
make -C wabt gcc-release

Usage

Compile a wasm module:

wast2wasm test/addTwo.wast -o test/addTwo.wasm

Load and call a function in a wasm module:

./warpy-jit test/addTwo.wasm addTwo 11 12

You can also use standard python (but it's much slower of course):

python warpy.py test/addTwo.wasm addTwo 13 14

There is also a REPL mode that allow you to interactively invoke functions within a module:

./warpy-jit --repl test/addTwo.wasm
webassembly> addTwo 2 3

Misc

Some rough notes for running the WebAssembly specification tests can be found in notes\_testing.

License

MPL-2.0 (see LICENSE)

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].