Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.59 KB

write_new_widget.md

File metadata and controls

32 lines (21 loc) · 1.59 KB

🛠️ Implementing a new widget

What is a widget

A widget represents a piece of information displayed on the display.
It has a name and a corresponding value, that is updated dynamically.
Additionally, a widget consumes a configuration, that is entered by the user via the dashboard.

WebAssembly

Widgets are WebAssembly components, that implement the interface defined by the exports of the wg_display_widget_wit.
They are loaded by the WG Display application and run using the wasmtime WebAssembly runtime.

Using WebAssembly, as the basis for the widgets, has the following advantages:

  • Widgets are sandboxed and can't directly access the host system
  • Widgets can be written in any language that compiles to WebAssembly
  • Widgets can run on any platform that is supported by wasmtime

🚦 How to get started

The starting point for implementing widgets are the template repositories.
They contain the instructions on how to build and distribute the widget.

Language Remarks
Rust -
Python Experimental

📦 Distribute the widget

See Add your widget to the store for more information.