aboutsummaryrefslogtreecommitdiff
path: root/montis/README.md
blob: f3974c2f29dd68903cc45abc773f033954da949b (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
Montis (Haskell Window Manager World)
====================================

Montis is the hot-reloadable window manager logic for the Ark runtime.

It builds to a shared object (`montis.so`) that Ark loads at runtime. You can
edit/rebuild the world and hot-reload it without restarting the compositor.

Native interface
----------------

Montis talks to the runtime through:

- the world ABI defined by Ark (`ark/include/world.h`), implemented in Haskell via
  `montis/src/Montis/Core/Internal/Foreign/Export.hs` and a small C shim
  `montis/src/harness_adapter.c`.
- the Cross bridge library (`libcross.a`), which provides world-facing helper
  functions used via FFI (see `montis/src/Montis/Base/Foreign/Runtime.hs`).

Building
--------

The world is built by Stack, typically driven by the top-level CMake build:

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

Or directly:

```sh
stack build
```

Output
------

The built `montis.so` ends up under the shared `build/stack-work` directory
(symlinked to `montis/.stack-work` by the top-level build).