atagen

monolith

public
Star0
Watch0
845a622a162f7d63f504aea4bd927130e2cb500e
1
ssh://brewery@pls.lobotomise.me:33/atagen/monolith.git

Blame: design/plan.md

57f44a63d99fatagen2026-10-16 05:34 UTC1
# monolith plan
57f44a63d99fatagen2026-10-16 05:34 UTC2
57f44a63d99fatagen2026-10-16 05:34 UTC3
Crate layout and milestones. Decisions behind them are in `decisions.md`.
57f44a63d99fatagen2026-10-16 05:34 UTC4
57f44a63d99fatagen2026-10-16 05:34 UTC5
## Crates
57f44a63d99fatagen2026-10-16 05:34 UTC6
57f44a63d99fatagen2026-10-16 05:34 UTC7
The hard logic lives in crates with no smithay dependency, so it compiles fast and takes headless property tests.
57f44a63d99fatagen2026-10-16 05:34 UTC8
57f44a63d99fatagen2026-10-16 05:34 UTC9
| crate | smithay | contents |
57f44a63d99fatagen2026-10-16 05:34 UTC10
|---|---|---|
57f44a63d99fatagen2026-10-16 05:34 UTC11
| `planner` | no | multiphase planner, geometry, invariants, property tests |
57f44a63d99fatagen2026-10-16 05:34 UTC12
| `motion` | no | beziers with exact `t`, best-effort velocity handoff, timelines sampled at presentation time |
57f44a63d99fatagen2026-10-16 05:34 UTC13
| `layout` | no | tags (model B), homeless, slotmap tree, row stacking, expand, floating, scratchpads, commands, target rects |
57f44a63d99fatagen2026-10-16 05:34 UTC14
| `config` | no | TOML schema, parsing, reload diffing, window rules |
57f44a63d99fatagen2026-10-16 05:34 UTC15
| `ipc` | no | versioned JSONL message types shared by compositor and CLI |
57f44a63d99fatagen2026-10-16 05:34 UTC16
| `render-vk` | yes | Vulkan renderer implementing smithay's renderer traits |
57f44a63d99fatagen2026-10-16 05:34 UTC17
| `protocols` | yes | protocols monolith writes itself (ext-workspace, later tearing-control, output management, foreign-toplevel management, gamma) |
57f44a63d99fatagen2026-10-16 05:34 UTC18
| `testkit` | yes | headless backend, sctk test clients, golden images, tree invariants |
57f44a63d99fatagen2026-10-16 05:34 UTC19
| `monolith` (bin) | yes | state, shell glue, backends, frame scheduler, stage pipeline, `msg` and `spawn` subcommands |
57f44a63d99fatagen2026-10-16 05:34 UTC20
57f44a63d99fatagen2026-10-16 05:34 UTC21
`motion` and `planner` stay separate. The frame scheduler starts inside the binary.
57f44a63d99fatagen2026-10-16 05:34 UTC22
57f44a63d99fatagen2026-10-16 05:34 UTC23
## Backends
57f44a63d99fatagen2026-10-16 05:34 UTC24
57f44a63d99fatagen2026-10-16 05:34 UTC25
- **Nested** runs inside another Wayland compositor and is supported for the life of the project, not just during early development. It renders into dmabufs and attaches them to a host `wl_surface` through linux-dmabuf, so nested and DRM share one render-to-dmabuf path and both get presentation feedback. smithay's winit backend is EGL/GLES-only, so it is not used.
57f44a63d99fatagen2026-10-16 05:34 UTC26
- **DRM** on bare metal from M5.
57f44a63d99fatagen2026-10-16 05:34 UTC27
- **Headless** for `testkit`.
57f44a63d99fatagen2026-10-16 05:34 UTC28
57f44a63d99fatagen2026-10-16 05:34 UTC29
## Milestones
57f44a63d99fatagen2026-10-16 05:34 UTC30
57f44a63d99fatagen2026-10-16 05:34 UTC31
| # | milestone | notes |
57f44a63d99fatagen2026-10-16 05:34 UTC32
|---|---|---|
57f44a63d99fatagen2026-10-16 05:34 UTC33
| M0 | Scaffolding. jj repo, flake (crane, devshell, lavapipe), workspace skeleton, `nix flake check` gate, Tracy feature | |
57f44a63d99fatagen2026-10-16 05:34 UTC34
| M1 | Planner spike. `planner` and `motion`, new planner for diagonal, cross-output and large merge groups, property tests over random layouts and interrupt sequences, plan visualiser | parallel with M2 |
57f44a63d99fatagen2026-10-16 05:34 UTC35
| M2 | Nested compositor with the Vulkan renderer. Nested host backend, smithay renderer traits, shm and dmabuf import, xdg-shell, one output, one tag, lavapipe golden tests | proves the renderer |
57f44a63d99fatagen2026-10-16 05:34 UTC36
| M3 | `layout` and tags. Model B, homeless, row stacking, expand, floating, scratchpads and sticky, ext-workspace, JSONL IPC and CLI, TOML config with reload, window rules | still nested |
57f44a63d99fatagen2026-10-16 05:34 UTC37
| M4 | Animation integration. Planner wired in, presentation-time sampling, clamp-to-edge snapshots, spawn and close, transition-shader hook | |
57f44a63d99fatagen2026-10-16 05:34 UTC38
| M5 | DRM backend. udev, libinput, session, smithay DRM compositor, deadline scheduler from flip timestamps, explicit sync, VRR with cursor throttling, hotplug and replug restore. Tested on NVIDIA and Intel | first bare metal |
57f44a63d99fatagen2026-10-16 05:34 UTC39
| M6 | Daily-driver gate. layer-shell, session-lock, idle notify and inhibit, xdg-activation with launch context, lazy Xwayland, data-control, image-copy-capture and portals | switch from wry here |
57f44a63d99fatagen2026-10-16 05:34 UTC40
| M7 | Performance. Off-thread shm upload, commit blockers, fullscreen direct scanout, SCHED_RR, global-priority queues, measured against the targets | |
57f44a63d99fatagen2026-10-16 05:34 UTC41
| M8 | Gaming. smithay tearing patches, tearing-control, keyboard-shortcuts-inhibit, pointer constraints, cursor policy while tearing | |
57f44a63d99fatagen2026-10-16 05:34 UTC42
| Later | Custom shaders, deck mode, i3-style titles, HDR and color, hybrid GPUs, output management, gamma | |