MixViu
How it works

One Bus. Four engines.
Two commands per app.

This page takes MixViu apart, one piece at a time. Each chapter animates as you reach it. If you only remember one idea: everything is a Bus citizen, and every app's abilities are data.

01
The Bus

A message port for everything.

In 1987 the Amiga's ARexx gave every application a named message port, and one script could drive them all. MixViu does the same thing for a whole network of machines.

  • Every command is named owner.verb, like maild.accounts or comp.windows.list.
  • The node daemon, noded, routes each message and checks the sender's identity before it is delivered.
  • Every reply carries a numeric rc: 0 accepted, 1–9 accepted with a warning, 10 and above refused, below zero a local failure.
  • Services announce changes as topics, and anyone allowed can subscribe.
  • Every citizen answers HELP, INFO and QUIT without writing a line for them.
citizen.mix needs a Bus: shown, not run
-- greeter.mix: run it with `mix --serve greeter.mix`.
-- One `on` handler is a complete Bus service. HELP, INFO and QUIT
-- come free from the runtime, and HELP lists this command and its desc.
on greeter.hello desc "Say hello to someone"
  $who = $event.body.name ?? "world"
  reply({greeting: "hello, " .. $who})
end
send.mix needs a Bus: shown, not run
-- Any script, any agent, the same one line: `send owner verb`.
send greeter greeter.hello body={name: "Ada"}
print($reply.greeting)          -- hello, Ada

-- Ask an app what it can do, then do it. Menus, keys and agents
-- all end in this same execute call.
send dopus dopus.actions
print(len($reply) .. " actions on offer")
send dopus dopus.execute body={id: "view.refresh", params: {}}
print("rc " .. $rc)             -- 0 delivered and accepted
02
mix · the shell

A shell that hands you data, not text.

mix is the login shell, the REPL, the script runner and the manual. It is also the language every MixViu app's behaviour is written in.

  • Variables always wear a $; joining strings is ..; blocks close with end.
  • Programs run by argv lists, so a filename with a space is just a filename.
  • Config files (.conf.mix) are strict data: they are parsed, never executed.
  • Mix has no natural-language mode. An agent turns your words into Mix; Mix does exactly what it says.

Read the full tour of Mix →

values.mix run at build time
-- Values are structured: lists and maps, not text to re-parse.
$engines = ["mix", "mixd", "viud", "viu"]
print(map($engines, fn($e) = upper($e)))

$disk = {mount: "/", free_gb: 412, used_pct: 37}
if $disk.used_pct < 80 then
  print("plenty of room: " .. $disk.free_gb .. " GB free on " .. $disk.mount)
end
output, captured 2026-11-27 with mix 0.119.0
[MIX, MIXD, VIUD, VIU]
plenty of room: 412 GB free on /
03
mixd · the headless host

One binary on every server.

mixd is a multi-call binary: the Mix engine's service profile plus every headless personality. The name it is started under picks the job, so maild and webd can simply be links to mixd.

  • mixd serve runs Mix services as Bus citizens.
  • No display, GPU, input or audio library is linked in. A release gate checks it.
  • Before anyone writes a new Rust daemon, the job is tried as a Mix script first.
  • This website is served by webd, one of mixd's personalities.
nodedmaildwebddnsdblobdhostdsettingsdindexdnotifydavtoolsdpeersdagentdexportdmonitordclipddaylight…

services in the repository today: 26

04
viud · the compositor

It owns the glass, and nothing more.

viud is a Wayland compositor: scanout, rendering, input, screen capture, and the final say over windows and outputs, including the hot corners and edges. It contains no widget toolkit.

  • It answers on the Bus as comp: list windows, place them, watch changes, record the screen.
  • Agents get their own input seat, offered only to apps you allow. Your seat stays yours.
  • An agent asking to drive a window that has not opted in is refused, with the setting to change.
  • HDR output and colour management are already in.
Quointermdopusmonitor10:42
term
dopus
monitor
agent seat · opted in
05
viu · the toolkit

Scenes describe. Mix decides.

A viu app is a scene document and a Mix behaviour. The scene names widgets and binds their properties to a model. The behaviour updates the model when something happens; viu redraws only what changed.

  • The panel, launcher and on-screen displays use the same widgets as app windows.
  • Behaviour starts in Mix. An app moves to Rust only after a measured, diagnosed performance failure, never just because it is big.
  • The aim: about 95% of native Rust speed, with an edit-to-usable loop at least twice as fast.
the model, changing
$model = {…}
→
Volume
Speakers · 40%
scene.mix needs a Bus: shown, not run
-- osd scene (apps/osd/scene.mix): composition and bindings only.
-- "= $model.x" binds a widget property to the Mix behaviour's model.
{
  root:  {widget: "column", gap: 4, children: ["title", "body"]},
  title: {widget: "text", text: "= $model.title", size: 24, bold: true},
  body:  {widget: "text", text: "= $model.text",  size: "= $model.text_size"}
}
behaviour.mix needs a Bus: shown, not run
-- osd behaviour (apps/osd/app.mix, trimmed): the Mix side decides.
fn sync_model()
  $model = $core.listing($state.osd, monotonic())
  send "viu-local" "scenes.model" body={generation: $ctx.generation, value: $model}
end

fn refresh_windows()
  send $comp "comp.windows.list" body={}          -- ask viud, over the Bus
  if $rc != 0 then return false end
  for $w in $reply.windows $state.windows[to_string($w.id)] = $w end
  return true
end
06
actions · execute

Abilities are data.

Every application exposes what it can do behind two commands. <app>.actions returns the list: id, label, menu, shortcut, whether it is enabled and, if not, why. <app>.execute {id, params} runs one.

  • Menus, keybindings, the command line and agents all end in the same execute.
  • Parameters are typed, so a form can be drawn from them and a bad call is refused before it runs.
  • MCP, for AI clients that speak it, is a small adapter written in Mix. It offers a few generic tools, never one per action, and never goes around the Bus.
monitor.actions (first three, from the app's registry)
[
  {id: "help.macros",  label: "Macros",      menu: "Help",
   class: "intent", enabled: true, shortcut: nil},
  {id: "file.refresh", label: "Refresh now", menu: "File",
   class: "intent", enabled: true, shortcut: "Ctrl+R"},
  {id: "file.quit",    label: "Quit",        menu: "File",
   class: "intent", enabled: true, shortcut: "Ctrl+Q"},
  …
]
07
Boundaries

Engines never link each other.

The four engines share exactly two things: the Mix library and the Bus crate. Every other boundary is the Bus. That keeps each one small enough to reason about, and replaceable.

  • Foreign C code inside MixViu binaries is limited to a short, named list, each with an exit path.
  • The mix binary, every server's login shell, carries nothing desktop-only.
  • Everything lives in one public repository, and main changes only through reviewed pull requests and a merge queue.
08
Direction, not yet built

Where it is heading

Two ideas shape the next stretch. Both are decisions with plans behind them, not finished features.

agent UI

Agent-generated interfaces

An agent composes a scene from the existing widget catalogue, binds it only to declared actions, and viu shows it as a clearly marked agent surface. Today agents drive the UI through actions and by editing scene files.

.history

Self-disclosure

MixViu should be able to show any authorised person what any part of it did. Every service gets one <svc>.history verb with the same row shape; the node daemon's Bus history (metadata only, kept for 30 days) came first.

See the code behind it.

The Mix page runs every runnable example when this site is built and shows you the real output.