aboutsummaryrefslogtreecommitdiff
path: root/cross/README.md
blob: b435e7cae323fe898dceccc6a03711dda47374ec (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
Cross (Native Bridge Library)
=============================

Cross is a static C library (`libcross.a`) that provides native helper
functions for a dynamically loaded world to interact with the runtime and
wlroots.

Why a static library?
---------------------

These helpers are linked into the world (`.so`) so they hot-reload along with
the world, instead of being stuck inside the long-running runtime process.

API surface
-----------

Public headers live in `cross/include`.

- `cross/include/util.h`: world-facing functions used via FFI, including:
  - runtime requests (log/exit/hot-reload)
  - seat access
  - toplevel queries and basic positioning/geometry helpers

Building
--------

Cross is built via the top-level CMake project:

```sh
cmake -S .. -B ../build
cmake --build ../build --target cross
```