Introduction

This project defines WASI APIs for embedded devices with the aim of providing a common language and platform independent runtime for embedded use, simplifying targetting a variety of embedded platforms, supporting dynamic discovery and hot reloading of applications, and making it easy to design / share / mess with embedded things. The WASI APIs are intended to span from basic peripheral drivers like SPI and I2C, to more complex functionality like driving LEDs or displays and publishing or subscribing to data. Everything one could need to write unreasonably portable IoT applications.

Core to the project are witx specifications describing these APIS, alongside runtime bindings providing the APIs and HAL libraries to expose these to consumers in different languages. In the future it is expected that we'll be able to generate runtime and language bindings using these specifications, however, as witx has not yet standardised we're writing boilerplate for now.

To get started using embedded-wasm, check out the Getting Started section.

Project Layout

  • spec/ contains API specifications using witx and other mechanisms
  • hal_rs/ contains wasm-embedded-hal, an rust embedded-hal implementation using these APIs, including test applications
  • hal_as/ contains wasm-embedded-hal, an AssemblyScript implementation using these APIs, including test applications
  • rt/ contains wasm-embedded-rt, a rust/wasmtime based runtime for linux, including mocking and wasm-embedded-lib bindings for development purposes.
  • lib/ contains [wasm-embedded-lib], a c/wasm3 based runtime for embedding in C projects
  • tests/ contains a set of test specifications for end-to-end testing of HALs and runtimes
  • docs/ contains these docs