Wasm runtime written in Rust

Related tags

WebAssembly rasm
Overview

rasm

Wasm runtime written in Rust

For studying

Play

Compile WebAssembly

$ cat examples/myfunc.wat
(module
  (func $add (param $lhs i32) (param $rhs i32) (result i32)
    local.get $lhs
    local.get $rhs
    i32.add
  )
  (func $sub (param $lhs i32) (param $rhs i32) (result i32)
    local.get $lhs
    local.get $rhs
    i32.sub
  )
  (func $mul (param $lhs i32) (param $rhs i32) (result i32)
    local.get $lhs
    local.get $rhs
    i32.mul
  )
  (export "add" (func $add))
  (export "sub" (func $sub))
  (export "mul" (func $mul))
)
$ wat2wasm examples/myfunc.wat

Call exported functions

$ cargo build --release
$ ./target/release/rasm myfunc.wasm add 5 6
11
$ ./target/release/rasm myfunc.wasm sub 5 6
-1
$ ./target/release/rasm myfunc.wasm mul 5 6
30
You might also like...
The Wasm-Enabled, Elfin Allocator

wee_alloc The Wasm-Enabled, Elfin Allocator API Docs | Contributing | Chat Built with ๐Ÿฆ€ ๐Ÿ•ธ by The Rust and WebAssembly Working Group About wee_alloc:

wasmy, easily customize my wasm app

wasmy wasmy, easily customize my wasm app! features Completely shield vm-wasm interaction details Simple and flexible ABI, supports freely adding vm a

Dister builds and bundles your wasm web app.

dister Dister builds and bundles your wasm web app. Installation cargo install dister Requirements wasm32-unknown-unknown target: rustup target add wa

A console and web-based Gomoku written in Rust and WebAssembly
A console and web-based Gomoku written in Rust and WebAssembly

๐Ÿ‘‹ rust-gomoku A console and web-based Gomoku written in Rust and WebAssembly Getting started with cargo & npm Install required program, run # install

darkforest is a console and web-based Roguelike written in Rust and WebAssembly.
darkforest is a console and web-based Roguelike written in Rust and WebAssembly.

darkforest darkforest is a console and web-based Roguelike written in Rust and WebAssembly. Key Features TBA Quick Start TBA How To Contribute Contrib

simple operating system written in Rust with wasi support.

Agave OS Agave OS is a simple operating system written in Rust with wasi support. It is designed to be lightweight and easy to use. It is also designe

Sealed boxes implementation for Rust/WebAssembly.

Sealed boxes for Rust/WebAssembly This Rust crate provides libsodium sealed boxes for WebAssembly. Usage: // Recipient: create a new key pair let reci

WebAssembly on Rust is a bright future in making application runs at the Edge or on the Serverless technologies.
WebAssembly on Rust is a bright future in making application runs at the Edge or on the Serverless technologies.

WebAssembly Tour WebAssembly on Rust is a bright future in making application runs at the Edge or on the Serverless technologies. We spend a lot of ti

MORUS cipher for Rust.

MORUS for Rust This is a Rust implementation of MORUS (MORUS-1280-128), ported from the Zig implementation. MORUS is a fast authenticated cipher for p

Owner
Teppei Fukuda
Teppei Fukuda
Autogenerated async RPC bindings that instantly connect a JS frontend to a Rust backend service via WebSockets and WASM.

Turbocharger Autogenerated async RPC bindings that instantly connect a JS frontend to a Rust backend service via WebSockets and WASM. See https://gith

null 28 Jan 2, 2023
A template for kick starting a Rust and WebAssembly project using wasm-pack.

A template for kick starting a Rust and WebAssembly project using wasm-pack.

Haoxi Tan 1 Feb 14, 2022
{Wasm+Rust} Build and animate Conway's Game of Life

A self-guided learning project that includes Rust + Wasm together. Who knows, maybe Typescript and React joins too..

M.Yavuz Yagis 1 Feb 14, 2022
Lumen - A new compiler and runtime for BEAM languages

An alternative BEAM implementation, designed for WebAssembly

Lumen 3.1k Dec 26, 2022
๐Ÿš€Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere

Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere: from Desktop to the Cloud, Edge and IoT devices.

Wasmer 14.1k Jan 8, 2023
A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.

Run JavaScript in WebAssembly Now supporting wasmedge socket for HTTP requests and Tensorflow in JavaScript programs! Prerequisites Install Rust and w

Second State 219 Jan 3, 2023
WebAssembly to Lua translator, with runtime

This is a WIP (read: absolutely not ready for serious work) tool for translating WebAssembly into Lua. Support is specifically for LuaJIT, with the se

null 43 Dec 31, 2022
Wasmtime - Standalone JIT-style runtime for WebAssembly, using Cranelift

wasmtime A standalone runtime for WebAssembly A Bytecode Alliance project Guide | Contributing | Website | Chat Installation The Wasmtime CLI can be i

Bytecode Alliance 11.1k Jan 2, 2023
Standalone JIT-style runtime for WebAssembly, using Cranelift

wasmtime A standalone runtime for WebAssembly A Bytecode Alliance project Guide | Contributing | Website | Chat Installation The Wasmtime CLI can be i

Bytecode Alliance 11.1k Dec 31, 2022
Lunatic is an Erlang-inspired runtime for WebAssembly

Lunatic is a universal runtime for fast, robust and scalable server-side applications. It's inspired by Erlang and can be used from any language that

Lunatic 3.7k Jan 9, 2023