blob: d773e0db0084da4321ac37e019dfa813be5e160a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
Ark (Runtime)
=============
Ark is a long-running Wayland compositor runtime with a hot-reloadable soul
interface.
Responsibilities
----------------
- Owns the Wayland display lifecycle and wlroots setup.
- Loads a soul shared object (`.so`) at runtime and routes input/surface events to it.
- Supports hot-reloading the soul without restarting the compositor.
Soul interface
--------------
The runtime defines a C ABI that souls must implement (load/start/teardown,
event handlers, and optional state marshal/unmarshal for hot reload). The ABI is
defined in:
- `ark/include/soul.h`
Souls should include:
- `ark/include/soul_interface.h`
Key files
---------
- `ark/src/wl.c`: compositor setup + event loop + soul callbacks.
- `ark/src/soul.c`: dynamic loading, lifecycle, and hot-reload logic.
- `ark/include/soul.h`: C ABI the soul must implement.
Building
--------
Ark is built via the top-level CMake project:
```sh
cmake -S .. -B ../build
cmake --build ../build --target ark
```
Running
-------
Use the top-level `run` target (builds the bundled soul and launches Ark):
```sh
cmake --build ../build --target run
```
|