71 lines
3.2 KiB
Markdown
71 lines
3.2 KiB
Markdown
|
|
# redox-wayland-compositor
|
||
|
|
|
||
|
|
Portage de Wayland sur Redox OS, en Rust pur, visant à terme à remplacer
|
||
|
|
Orbital comme serveur graphique de base.
|
||
|
|
|
||
|
|
**État** : phases 1+2+3 du plan directeur complétées le 2026-05-08.
|
||
|
|
|
||
|
|
Le pipeline shm Wayland complet est validé end-to-end sur Redox via redoxer
|
||
|
|
(crate `redox-wl-test-shm-pipeline`) : socket Unix réel, `wl_compositor` +
|
||
|
|
`wl_shm` globals, fd passing via SCM_RIGHTS, `wl_shm_pool` + `wl_buffer`,
|
||
|
|
`wl_surface.attach`/`damage`/`commit`, lecture pixels côté serveur via le
|
||
|
|
fd reçu — pixel-perfect.
|
||
|
|
|
||
|
|
## Structure
|
||
|
|
|
||
|
|
```
|
||
|
|
.
|
||
|
|
├── REDOX_COSMIC_XWAYLAND_RS_PLAN.md # plan directeur 14 phases / 5 ans
|
||
|
|
├── docs/
|
||
|
|
│ ├── existing-redox-gui.md # phase 1 : audit Orbital + graphics-ipc + inputd + relibc
|
||
|
|
│ └── redox-wayland-primitives.md # phase 2 : 5 primitives + POC pixels validés sur Redox
|
||
|
|
├── crates/
|
||
|
|
│ ├── redox-wl-test-unix-socket/ # primitive 1 : SOCK_STREAM Wayland-shaped
|
||
|
|
│ ├── redox-wl-test-fd-passing/ # primitive 2 : SCM_RIGHTS mono-process (artefact)
|
||
|
|
│ ├── redox-wl-test-fd-passing-fork/ # primitive 2b : SCM_RIGHTS via fork (vrai cas Wayland)
|
||
|
|
│ ├── redox-wl-test-shm-open/ # primitive 3 : shm_open + mmap MAP_SHARED
|
||
|
|
│ ├── redox-wl-test-poll-multifd/ # primitive 4 : poll() multiplexing + POLLHUP
|
||
|
|
│ ├── redox-wl-poc-pixels/ # POC : datapath shm + SCM_RIGHTS bout en bout
|
||
|
|
│ ├── redox-wl-test-handshake/ # phase 3 : wayland-rs server/client registry
|
||
|
|
│ └── redox-wl-test-shm-pipeline/ # phase 3 : pipeline shm complet validé
|
||
|
|
└── (pas de Cargo.toml racine : chaque crate est standalone — voir note ci-dessous)
|
||
|
|
```
|
||
|
|
|
||
|
|
> **Note structure** : pas de workspace Cargo racine. Chaque crate dans `crates/`
|
||
|
|
> est autonome avec son propre `Cargo.toml` et son propre `target/` lors de la build.
|
||
|
|
> Raison : `redoxer build`/`redoxer run` cherche le binaire dans `<crate>/target/...`
|
||
|
|
> et n'arrive pas à le retrouver si le `target/` est centralisé au niveau workspace.
|
||
|
|
> Ce sera repensé quand on aura un compositor unique vs plusieurs binaires de tests.
|
||
|
|
|
||
|
|
## Prérequis
|
||
|
|
|
||
|
|
- Rust nightly (récent — testé 2026-05-07)
|
||
|
|
- Target installé : `rustup target add x86_64-unknown-redox --toolchain nightly`
|
||
|
|
- `cargo install redoxer` puis `redoxer install` (sysroot Redox ~456 Mo)
|
||
|
|
- Repo upstream `Smithay/wayland-rs` cloné en `../wayland-rs/` (paths relatifs depuis `crates/*/Cargo.toml`)
|
||
|
|
|
||
|
|
## Reproduire les tests
|
||
|
|
|
||
|
|
Chaque crate s'exécute via redoxer (mini-VM Redox sous QEMU) :
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd crates/redox-wl-test-shm-pipeline
|
||
|
|
redoxer run --release
|
||
|
|
```
|
||
|
|
|
||
|
|
Pattern attendu en fin d'exécution : `[test-XX] PASS: ...`.
|
||
|
|
|
||
|
|
> **Important** : utiliser `redoxer build` ou `redoxer run`, **pas** `cargo build --target=x86_64-unknown-redox` direct
|
||
|
|
> qui fait un fail au link (`undefined reference CMSG_NXTHDR/CMSG_DATA`) parce que le linker host
|
||
|
|
> ne sait pas chaîner librelibc.a du sysroot Redox. `redoxer` configure le linker correctement.
|
||
|
|
|
||
|
|
## Roadmap
|
||
|
|
|
||
|
|
Voir `REDOX_COSMIC_XWAYLAND_RS_PLAN.md` pour le plan complet 14 phases / 5 ans.
|
||
|
|
|
||
|
|
Prochaine étape : **phase 4 — display backend Redox via `graphics-ipc::V2GraphicsHandle`**.
|
||
|
|
|
||
|
|
## Licence
|
||
|
|
|
||
|
|
Leyoda 2026 — GPLv3+
|