2.3 KiB
2.3 KiB
AGENTS.md
Project intent
This repository is for building a Rust Wayland tiling compositor, not an X11 window manager.
The intended progression is:
- nested compositor first
- single output first
- single workspace first
- single tiling layout first
- standalone session later
Use smithay as the foundation unless the user explicitly directs otherwise.
Working rules
- Prefer small, staged changes that match the roadmap in
README.mdandGUIDE.md. - Do not jump straight to DRM/KMS, multi-monitor, XWayland, animations, or IPC unless the current lower stage is already solid.
- Keep compositor integration code near the edges of the codebase.
- Keep layout, workspace, and focus logic in plain Rust types that are testable without Smithay-heavy setup.
- Prefer one feature-complete path over many half-implemented systems.
Early priorities
When implementing the compositor, the preferred order is:
- event loop boots
- Wayland client connects
- XDG toplevel maps
- one surface renders
- keyboard and pointer input work
- one tiling layout works
- workspaces work
- multi-output works
- standalone session works
Dependency guidance
Expected direct crates for the early stages:
smithaycallooptracingtracing-subscriberxkbcommonanyhowthiserrorbitflags
Possible later crates:
serdetomlclapzbus
Code structure guidance
Prefer a layout like:
src/
main.rs
app.rs
state.rs
backend/
input/
layout/
shell/
render/
workspace/
config/
Guidelines:
backend/should isolate nested vs tty/session-specific code.layout/should not depend heavily on Smithay types.shell/should handle XDG/toplevel lifecycle.render/should translate compositor state into frame output.workspace/should own workspace and window placement policy.
Documentation guidance
- If the architecture changes materially, update
README.md. - If the build progression or crate recommendations change materially, update
GUIDE.md. - Keep docs practical and staged rather than aspirational.
Validation guidance
- Prefer targeted checks over broad guesses.
- If code is added, run the narrowest useful verification command available.
- If verification is not possible, state that explicitly.