Slipway is an open source framework for displaying useful information on your devices, from eInk screens to phones to monitor walls.
For more information please see our website.
For installation instructions, please see here.
Please read CONTRIBUTING.md before opening any PRs.
We use Just to automate building this repository, and Nextest to run tests. You can install both of these with:
cargo install just cargo-nextest
You'll also want to have the WASI Preview 2 target installed:
rustup target add wasm32-wasip2
When building on Linux there are a few dependencies, which you can install with your package manager, for example:
sudo apt-get install libssl-dev libsixel-bin fontconfig
To build the repository, run:
just build
To run the tests, run:
just test
We provide a shell script symlink.sh
which will symlink ~/bin/slipway
to the release build,
and ~/bin/slipwayd
to the debug build.
This allows you to easily run your locally compiled version of Slipway on path:
slipway --help
The source code of the Slipway CLI, Slipway Engine, and associated crates.
The Slipway CLI. This allows you to run and debug Rigs from the command line, as well as serve Rigs from a web server.
The core of Slipway which evaluates the current state of a Rig along with the inputs and outputs of the Components for the current state, and lets you move the Rig through states until it has been fully evaluated.
A utility crate used by the various Component runners to implement the interface between the host (Slipway) and a Component.
They make it easy for different runners, such as the WASM and Javascript runners, to behave in a consistent manner both from the point of view of Slipway and the running Component.
Runs Slipway Components which have been compiled to WebAssembly (WASM). This runner uses Wasmtime crate to execute the components.
It uses the WIT file in /src/wit/latest
to define the interface between the host and the Component.
Runs Slipway Components written in Javascript. This Javascript runner uses the Boa crate, which is Javascript lexer, parser and interpreter written in Rust.
We are currently focused on using Boa for running Javascript crates because:
- We want to maintain a consistent experience (in terms of behavior, security and sandboxing) whether we are running Slipway Rigs from the command line, or in a browser.
- We want to encourage and support the development of a native Rust Javascript engine.
Runs "Fragment" Slipway Components. A Fragment Component is essentially a Rig which takes an input and returns an output. A Fragment Component is used to represent part of (or a fragment of) a complete Rig as a Component.
As an example, the echarts
Slipway Component is a Fragment Component.
It rigs together the echarts_svg
Component (which takes an echarts definition and outputs an SVG) and the svg
Component (which takes an SVG input and outputs a Canvas), to provide
a new Component which takes an echarts definition as an input and returns a Canvas
as an output.
Rust macros used by other crates in this repository.
Test utilities used by other crates in this repository.
The source code of Slipway Components used for testing.
The current WebAssembly Interface Type (WIT) file describing the interface between WASM Slipway Components and the Slipway host.