Rust WASI Example

A toy program implementing WASI and running it with WAPM we must first make an account:

Rust WASI Example

A toy program implementing HQ9+ to demo compiling Rust to WASI and running it with Wasmer.

Setting up

You will need the Rust toolchain installed.

First, let's clone the repo:

Ensure you have an up to date version of Rust and run:

Building

Running

Uploading to WAPM

Setting up wapm cli

To upload to WAPM we must first make an account:

  1. Go to wapm.io
  2. Create an account (sign up)
  3. Log in with the wapm cli client

Setting up the project for wapm

To run the project with wapm we must create a wapm.toml manifest file to instruct wapm how to run the wasm binary.

Our wapm.toml contains 3 sections:

  • [package] This is where the metadata about the package lives
  • [[module]] This is where metadata about the module (wasm binary) lives
  • [[command]] This is where we tell wapm how to run the module and what to call it

For more information about these sections see the documentation.

IMPORTANT: To publish the project to the wapm registry, you must change the namespace (the package.name field before the /) to match the username you made while signing up and that you are now logged in as (wapm whoami).

For your convenience, you may run the following snippet to edit it for you.

When making a new wapm project, this step is not necessary; the wapm init command creates a wapm.toml skeleton, with your name as the namespace, for you.

Running the project with wapm locally

Now that we're all set up, we can use wapm to run our wasm binary!

Uploading to WAPM

Now that we've set up wapm and verified that it works locally, we're ready to upload to the WAPM registry:

Running from WAPM

Information - Updated May 25, 2022

Stars: 30
Forks: 4
Issues: 1

maomi: A rust wasm framework for building pages with components

maomi is a MVVM-like framework for web development

maomi: A rust wasm framework for building pages with components

Rust / Wasm client web app framework

Pull requests which improve test coverage are also very welcome

Rust / Wasm client web app framework

A Rust/WASM Library to interact with Bitcoin SV

npm i bsv-wasm-bundler --save

A Rust/WASM Library to interact with Bitcoin SV

WASM / Rust / D3 example

Fetch data with Rust + WASM and show it with JS + D3

WASM / Rust / D3 example

@texhno-rust-wasm-game-of-life

A template for kick starting a Rust and WebAssembly project using Tutorial

@texhno-rust-wasm-game-of-life

rust wasm worker hello world

Built using the template at which

rust wasm worker hello world

👷‍♀️🦀🕸️ rustwasm-worker-template

A template for kick starting a Cloudflare worker project using

👷‍♀️🦀🕸️ rustwasm-worker-template

Rust WASM Web Worker Examples

This repository contains four different examples of using web workers in conjunction with WASM in

Rust WASM Web Worker Examples

NES Emulator in Rust-WASM

Requires Rust with cargo, nodejs, and wasm-pack

NES Emulator in Rust-WASM
Facebook Instagram Twitter GitHub Dribbble
Privacy