All Projects → jedisct1 → As Wasi

jedisct1 / As Wasi

Licence: mit
An AssemblyScript API layer for WASI system calls.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to As Wasi

Percy
Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
Stars: ✭ 1,856 (+1274.81%)
Mutual labels:  webassembly, wasm
Wasmplay
WASM Web "Framework" Playground
Stars: ✭ 105 (-22.22%)
Mutual labels:  webassembly, wasm
D3 Wasm Force
A re-implementation of d3-force with WebAssembly.
Stars: ✭ 93 (-31.11%)
Mutual labels:  webassembly, wasm
Assortedwidgets
OpenGL GUI library
Stars: ✭ 92 (-31.85%)
Mutual labels:  webassembly, wasm
Wasmex
Execute WebAssembly / WASM from Elixir
Stars: ✭ 136 (+0.74%)
Mutual labels:  webassembly, wasm
Dcmjs
dcmjs is a javascript cross-compile of dcmtk (dcmtk.org).
Stars: ✭ 92 (-31.85%)
Mutual labels:  webassembly, wasm
Wasmer Go
🐹🕸️ WebAssembly runtime for Go
Stars: ✭ 1,365 (+911.11%)
Mutual labels:  webassembly, wasm
Web Dsp
A client-side signal processing library utilizing the power of WebAssembly (.wasm)
Stars: ✭ 1,278 (+846.67%)
Mutual labels:  webassembly, wasm
Jsnet
Javascript/WebAssembly deep learning library for MLPs and convolutional neural networks
Stars: ✭ 126 (-6.67%)
Mutual labels:  webassembly, wasm
Gbemu
WebAssembly based Gameboy Emulator
Stars: ✭ 120 (-11.11%)
Mutual labels:  webassembly, wasm
Emscripten Docker
Docker image with Emscripten to compile ASM.js and WebAssembly
Stars: ✭ 92 (-31.85%)
Mutual labels:  webassembly, wasm
Grain
The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
Stars: ✭ 2,199 (+1528.89%)
Mutual labels:  webassembly, wasm
Wasm Forth
A Forth implementation compiling to WebAssembly.
Stars: ✭ 92 (-31.85%)
Mutual labels:  webassembly, wasm
Blazormaterial
Blazor components implementing Google's Material components for web - https://material.io/components/web
Stars: ✭ 136 (+0.74%)
Mutual labels:  webassembly, wasm
Wasmer
🚀 The leading WebAssembly Runtime supporting WASI and Emscripten
Stars: ✭ 11,047 (+8082.96%)
Mutual labels:  webassembly, wasm
Telegram React
Experimental Telegram web client with tdlib, webassembly and react js under the hood
Stars: ✭ 1,332 (+886.67%)
Mutual labels:  webassembly, wasm
Wasm To Oci
Use OCI registries to distribute WASM modules
Stars: ✭ 83 (-38.52%)
Mutual labels:  webassembly, wasm
Draw App
In browser drawing app built in rust / wasm
Stars: ✭ 87 (-35.56%)
Mutual labels:  webassembly, wasm
Lunatic
Lunatic is an Erlang-inspired runtime for WebAssembly
Stars: ✭ 2,074 (+1436.3%)
Mutual labels:  webassembly, wasm
Stork
🔎 Impossibly fast web search, made for static sites.
Stars: ✭ 1,983 (+1368.89%)
Mutual labels:  wasm, webassembly

as-wasi

npm version npm downloads per month GitHub License

A high-level AssemblyScript layer for the WebAssembly System Interface (WASI). 🧩

WASI is an API providing access to the external world to WebAssembly modules. AssemblyScript exposes the low-level WASI standard set of system calls. as-wasi builds a higher level API on top of the AssemblyScript WASI interface, at a similar level to the Node API. 🚀

Installation

You can install as-wasi in your project by running the following:

npm install --save as-wasi

Quick Start

Example usage of the Console and Environ classes:

import "wasi";

// Import from the installed as-wasi package
import { Console, Environ } from "as-wasi";

// Create an environ instance
let env = new Environ();

// Get the HOME Environment variable
let home = env.get("HOME")!;

// Log the HOME string to stdout
Console.log(home);

Here are some exported classes that are commonly used:

  • FileSystem - Reading and Writing the user's fileystem. 📁
  • Console - General logging to stdout and stderr. 🖥️
  • Environ - Accessing environment variables, command flags, etc... 🌐
  • Date - Getting the current system time. 📅
  • Random - Accessing random numbers. 🤔
  • Time - Allow sleeping and waiting for events to occur. ⏰
  • And More! See the Reference API in the next section for the full API.

Reference API Docs

Reference API documentation can be found in REFERENCE_API_DOCS. Documentation is generated using typedoc.

Projects using as-wasi

  • wasmboy - Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀
  • wasmerio/io-devices-lib - Library for interacting with the Wasmer Experimental IO Devices API. Uses WASI for outputting graphics in a framebuffer, and handles mouse/keyboard input.
  • wasm-by-example - Wasm By Example is a website with a set of hands-on introduction examples and tutorials for WebAssembly (Wasm). Wasm By Example features as-wasi by default for the AssemblyScript WASI examples.
  • wasm-matrix - A Matrix effect in your terminal using AssemblyScript 🚀 and WASI 🧩 . This project is a bit older, and uses an older version of as-wasi, but still creates a cool effect!

If your project is using as-wasi, and you would like to be featured here. Please open a pull request against the README with links to your project, and if appropriate, explaining how as-wasi is being used. 😊

Contributing

Contributions are definitely welcome! Feel free to open a PR for small fixes such as typos and things. Larger fixes, or new features should start out as an issue for discussion, in which then a PR should be made. 🥳

This project will also adhere to the AssemblyScript Code of Conduct.

License

MIT. 📝

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