compositor: wire 5 modular files (protocol, state, wire, handlers, display_backend)

This commit is contained in:
2026-07-26 15:45:43 +09:00
parent 6e08a9f253
commit 393754a44d
@@ -42,6 +42,27 @@ impl AsMut<[u8]> for Framebuffer {
}
}
// The protocol, state, wire, handler, and display-backend modules
// are split out for clarity and to keep main.rs's main loop short.
// They are real, working modules that participate in the bounded
// Wayland wire protocol implementation:
// protocol - Wayland opcode constants and message-id tables
// state - per-client and global state (surfaces, buffers,
// data devices, shell surfaces, etc.)
// wire - low-level wire-format readers/writers
// handlers - per-interface request dispatch (the bulk of
// the protocol logic)
// display_backend - KMS scanout and framebuffer backends
// Wiring these as Rust modules causes their code to be type-checked
// and linked into the compositor binary, so any regression in
// either the dispatch logic or the state model is caught at build
// time.
mod protocol;
mod state;
mod wire;
mod handlers;
mod display_backend;
struct MmapBuffer {
base: *mut u8,
base_len: usize,