Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Meta / Goals / Tasks / Bugs Issue #2

Open
7 of 31 tasks
ryankurte opened this issue Dec 31, 2021 · 0 comments
Open
7 of 31 tasks

The Meta / Goals / Tasks / Bugs Issue #2

ryankurte opened this issue Dec 31, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@ryankurte
Copy link
Collaborator

ryankurte commented Dec 31, 2021

see also: https://github.com/orgs/embedded-wasm/projects/4

Goals

Enable cross platform / platform independent embedded application development by providing a common WASI/WITX API for WASM on embedded systems along with runtimes, engines, and supporting libraries to make it super easy to write / alter / mess with embedded devices.

Disclaimer

Everything here is very much a work in progress, we're almost at a point this can be used for simple tasks, but, there's still a lot to do so expect breakages, bugs, and other misadventures (and much of this still only exists in @ryankurte's head)

If you're interested in contributing we'd be chuffed to receive PRs or issues!
Over the longer term we will move this project to a community maintainership model similar to rust-embedded, however, as we are task-rich and time-poor we will operate as a (hopefully) benevolent dictatorship until churn has dropped to manageable levels.

If you are interested in playing with this or contributing you might like to check out the book.

Components

APIs

Low-Level Driver APIs (WASI)

Low-level APIs correspond to physical peripherals in embedded systems, supporting the development of drivers and interaction with the physical world, defined here in embedded-wasm/spec.

High-Level Driver / Platform APIs (WASI)

High Level / Platform APIs are intended to allow applications to be platform independent and support networked communication

  • DISPLAY - abstract interaction with display devices (+ touch / buttons?)
    Define Display API #4
  • LED - abstract interaction with LED strings / matricies
  • Device/Peripheral - inject peripherals / configuration into application objects to decouple applications from their physical platform
  • Publish/Subscribe - publish and subscribe to data / sources, supported by the platform (backed by MQTT, CoAP, etc.)

Management APIs (IP, USB)

External APIs should support interaction with WASI/Embedded capable devices, including discovery, configuration and app loading, and logging from applications.

  • Device Discovery - locating embedded wasm capable devices
    (mDNS definitions)
  • Application Loading - pushing applications to these devices
    (probably HTTP/WebSocket so we can run browser-based compilers)
  • Application Logging - receiving application updates
    (also HTTP/WebSocket for browser adventures, though something rsyslog compatible would also be desirable)

For non-IP use i've also been working on https://github.com/ryankurte/ghostfat for file-based loading of applets into memory, and planning to use this on the nrf52 platform.

Application Manifests

Manifests will provide information about an application, describing hardware requirements to runtimes so applets can be wired and executed on different platforms.

Manifests are currently an early draft / expect this section to be expanded (and based on https://github.com/ryankurte/fwsig)

Runtimes / Engines / Drivers

Platforms

HALs

Tasks

Bugs

Improvements

  • Refactor / Rework WITX specs / sort out generation so we can use these as canonical definitions in different languages (at the moment only wasmtime uses interface generation)

Questions

Would it be better to run a syscall-style API (with one or two methods that take instructions and objects) than the current wide-surface one?

this would be easier to implement in different runtimes and likely more reasonable for supporting sync/async with a common interface, however, it is important unclear how well defining objects works with WITX etc. (though to be fair, interfaces are also not super workable).

i think this is probably a worthwhile refactoring, but needs more exploration. for context see the draft syscall-experiment branches, everywhere.

@ryankurte ryankurte added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Dec 31, 2021
@ryankurte ryankurte self-assigned this Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant