Skip to content

v0.18 — Moybyte becomes an operating system

Choose a tag to compare

@nikola-j nikola-j released this 11 Nov 19:17
· 311 commits to master since this release

Moybyte v0.18: Moybyte becomes an operating system. Apps can be written in Python, Lua, WebAssembly or C, run side by side and in the background, and reach the board's hardware through permissions you grant. There is a real shell, SSH and a terminal in the browser. This is the biggest release so far: the whole 2026-11 OS sprint (#246), about 650 changes since v0.17.

Apps in any language, all treated the same

  • Four kinds of app, one set of rules. Python, Lua, compiled WebAssembly and native C programs (on the P4s) all become processes. Each one can be an app with a window, a background service, or both.
  • One UI toolkit everywhere. ui.* is a single C library, so a Lua, WebAssembly or C app draws the same buttons, lists, fields, dialogs and popovers as the built-in apps, and behaves the same on every board.
  • The same calls on every tier: messages between apps, notifications, timers and alarms (moybyte.at, cron), files and preferences, the clipboard, opening a file with another app, sharing, achievements and the system log.
  • Apps open files by type. An app says which file types it opens, and the console offers it for them.
  • New for app makers: crypto (hardware random numbers, SHA-256, HMAC, AES, Ed25519 and the curve maths a mesh stack needs), Lua's io and os over the app's own files, and the clock in real Unix time on every tier.
  • The moy-app SDK plugin creates, checks and pushes an app. moy-app check works out which permissions a module needs from what it imports.

Several apps at once, and in the background

  • Background services. An app can run a service that keeps going after you close its window. Examples are a music player, achievements and a mesh radio. Services can start with the console, and restart on a crash with a back-off.
  • Several apps open at once on every board, the T-Deck included.
  • A task manager: hold Mic (T-Deck) or Start to see what's running, how much CPU and memory each process uses, and stop one.
  • Notifications from any app or service.
  • Per-game achievements: a game declares its badges in its manifest. The achievements service, written in Lua, awards them and shows your progress.
  • On the S3 boards, Lua, WebAssembly and C services keep running when a big game stops Python to free memory. Only Python services pause.

Permissions and safety

  • The trust ladder. An app asks for what it needs (network, radio, files, devices) when you install it, and only gets that. Built-in apps are identified by where they come from, not by what they claim.
  • Native C apps are isolated on the P4s. They run in the CPU's user mode with memory protection. A crashing or hostile program is stopped without taking the console down. This was tested with deliberate attacks, a stack-pivot set and a long teardown soak.
  • The WebAssembly engine was fuzzed with malformed and hostile modules, on the host and on the boards.
  • https checks certificates on every console. Only the signed updater skips it, because its manifest carries its own signature.
  • A recovery console. After three crashes in a row the board boots to a safe floor with a text console. From there you can start safe mode, open a REPL, or install an update.
  • A system log in Settings → About → System log.
  • The OS design now has a threat-model section: what Moybyte protects against, and what it doesn't.

A real shell

  • The Terminal has a shell: pipes, scripts, variables, ls/cat/cp, top, a text editor, cron and at.
  • pkg installs and updates apps from the command line.
  • Settings are a plain text file you can read and edit.
  • Native and WebAssembly commands: C programs built with the SDK (an unmodified nc and head among them) and WASI command-line programs run from the shell. WASI commands also run in the browser's Terminal.

Reach your console from a computer

  • SSH into any console board (Ed25519 keys in /etc/authorized_keys, or a password). The console announces itself on the network as <name>.local.
  • SFTP: mount the console's files on your computer.
  • A web terminal in the browser, signed in with the console's device key.
  • The board as a USB drive: on the T-Deck and the Waveshare P4, Settings → General → USB drive shows the SD card to a computer. The console takes the card back when the computer lets go.
  • The Zero is reachable by SSH, SFTP and the web terminal too.

Hardware for apps

  • Apps borrow hardware through leases: GPIO pins, I2C, SPI, UART, LoRa (raw and LoRaWAN), the microphone, Bluetooth, USB host devices (HID, serial, MIDI) and the camera. Only one app holds a device at a time, and the console takes it back when the app ends.
  • Events from every source: buttons, the network, the radio, USB devices plugging in and out, connectivity changes.
  • USB host on the P4s: apps can open USB keyboards, mice, serial adapters and MIDI devices on the high-speed port.
  • On the T-Deck, the GPS is declared and the battery level is read correctly. Screen brightness applies on every board.

Music and sound

  • Music plays in C as a system service. Internet radio and music files keep playing in the background without costing the foreground app frame time.
  • 44.1 kHz stereo output on the P4s.
  • Games keep their frame rate while a stream plays. On the T-Deck, Brick Siege dropped to 51 fps with a stream on; it now holds 52.4.
  • Internet radio in the browser: SomaFM and Swiss Jazz play, and the audio no longer stutters or repeats after a few seconds.

Moy Mesh

  • Moy Mesh, a messenger that speaks Meshtastic's LoRa protocol, is the first app built on the new platform. It sends and receives channel and direct messages with Meshtastic devices and shows signal strength per message. It runs as a background service, so messages arrive while you play.
  • It installs from moybyte-org/carts (release moymesh-v1) on the T-Deck.

The desk and the toolkit

  • New toolkit parts, shared by every app:
    • chat bubbles and a signal glyph;
    • popovers with a button row;
    • list rows with subtitles, icons, monograms, counts and tags;
    • "Older messages" loading;
    • field details;
    • paste into fields;
    • dialog focus;
    • page titles in the top bar.
  • Bigger tap targets on the Guition S3, where rows are 36 px tall.
  • Apps have their thumbnails in the Play menu on the T-Deck and the P4s.
  • The Editor's Resize popover no longer flickers between layouts.

The browser console and the site

  • Two windows on the desk stay apart: typing goes only to the focused one, and each keeps its own title and tools. This fixes Notes and the Terminal mixing in the browser console.
  • The browser console's Terminal runs WASI commands.
  • The site's flasher brings the board back up after flashing. Before, the Waveshare P4 stayed on a black screen until you reset it. The page now resets each board with that board's own line sequence.
  • The site's Flash button shows and works again.
  • The Zero has more room: its image dropped the parts it doesn't use.

Fixes

  • A failed compiled load after a game stopped Python no longer leaves the T-Deck unresponsive.
  • The Guition P4's backlight no longer whines at any brightness below full: the backlight's PWM runs at 25 kHz.
  • Messages between apps are flood-safe: each sender has a queue cap, and dispatch is fair.
  • The store tidies away the old written/ folder beside the carts folder.
  • Many smaller fixes across the shell, the toolkit and the boards.

Updating

  • T-Deck, Guition S3, Waveshare P4, Guition P4: update over the air as usual, or flash from the site.
    • This release adds a core-dump partition and grows the Guition P4's app slots.
    • A board that updates over the air keeps its old partition table, which works with this firmware.
    • Flashing from the site or by cable installs the new layout.
  • Zero: flash it from the site or by cable. Its image no longer fits the old app slot, so the over-the-air update is refused.