NoWayOS
EN
GitHub
MenuClose

Start here

Start your own application

Clone the starter, run three commands and have an application of your own in a browser window, following your edits, then booting on seL4 in QEMU.

The quickest way to begin is the starter: a small application on NoWayOS that is ready to run and to change. It has two screens written in React, about sixty lines of Rust that join them, and a seL4 system to boot it on. You need no Rust and no seL4 knowledge to start.

NoWayOS is in development, and so is the starter: it is for learning and building.

What you need

  • git and GNU Make.
  • Podman. Docker works too: add ENGINE=docker to each command.
  • Nothing else. The Rust toolchains, seL4's Microkit SDK and QEMU are inside the dev container, pinned to exact versions.

On macOS, create and start Podman's virtual machine once:

podman machine init --cpus 4 --memory 8192
podman machine start

Three commands

git clone https://github.com/NoWayOS/starter.git my-app
cd my-app
make setup
make dev

make setup fetches NoWayOS and the Screen Compiler into the folder, at the commits the starter names, and builds the dev container: a few minutes and about 5 GB, once. It tells you if your machine lacks something, and it is safe to run again.

make dev runs the application and shows it at http://localhost:8017/. It is the same Rust that runs on the device, built for your machine. Type a name and press Continue.

Change it

Open app/starter-app/tsx/welcome.tsx, change some text and save. The screen is checked, converted to Rust, rebuilt and showing again about a second later, on the screen you were on. Change the logic in app/starter-app/src/lib.rs and the window follows that too.

If you write something the Screen Compiler does not convert, it says so above the screen, with the line and what to use instead, and the last good version stays up.

Add a screen

make new-screen NAME=thanks
make preview FILE=starter-app/tsx/thanks.tsx
make dev SCREEN=thanks

The first command writes a new screen from a template and prints the lines that wire it into the logic. The second draws it as a picture with NoWayOS's own renderer; add WATCH=1 and it redraws on every save. The third opens the application on that screen.

Boot it on seL4

make qemu VNC=1

This builds a real seL4 system of four protection domains and boots it in QEMU. Open vnc://localhost:5900 with the password it prints, and use the application with your keyboard and mouse. make qemu-test boots it with no screen and checks what it prints and shows.

Every capability each part holds is listed in app/systems/starter.grants, and the build fails if the system gives a part anything that file does not list. Your application's part holds its message rings and the framebuffer: no device, no interrupt, no network.

Make it yours

make rename NAME=my-product
make check

make rename renames the crates, the programs and the system throughout. make check runs the lints, the tests, the screens check and the QEMU test: run it before you share a change.

make ci goes further: it runs the security checks NoWayOS runs on itself, on your application. No key or credential in the tree or in any commit; every dependency under a permissive licence, from crates.io, with no known security advisory; no unsafe code; and a software bill of materials for what the device is built from.

Where next