diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 75 |
1 files changed, 75 insertions, 0 deletions
@@ -43,6 +43,16 @@ Montis is not a DSL and not a configuration file. It is the window manager. Written in a Turing-complete programming language with full access to the Arken runtime and wlroots itself. +#### Erebor -- Native Bridge Library + +**Erebor** (`liberebor.a`) is a static C library that contains the native +functions Montis uses to interact with Arken/wlroots. It is linked into the +`montis.so` plugin so these FFI bindings hot-reload along with the Haskell code +instead of living inside the long-running compositor process. + +Code lives in `erebor/src` and headers in `erebor/include` (notably +`erebor/include/util.h`). + ### Why This is Powerful Montis takes direct inspiration from XMonad. @@ -87,3 +97,68 @@ The solution is a pluggable architecture: * A persistent runtime (Arken) that owns wlroots and the Wayland lifecycle * A hot-reloadable window manager (Montis) that owns behavior + +## Building + +### Prerequisites + +- `cmake` +- A C toolchain (`cc`, `ld`, etc.) +- `pkg-config` +- wlroots build deps via your distro (Wayland, xkbcommon, libinput, pixman, etc.) +- `meson` (wlroots is built via Meson) and a backend like `ninja` +- `wayland-scanner` and `wayland-protocols` +- `curl` (first build downloads wlroots) +- Optional (only for the bundled plugin): Haskell toolchain via Stack: `stack` (+ GHC) + +### Build + +This repo uses CMake to build: +- `arken` (the compositor runtime) +- `erebor` (`liberebor.a`) +- the Haskell plugin (`montis.so`) via Stack + +```sh +cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug +cmake --build build +``` + +To build only the runtime + bridge library (no bundled plugin): + +```sh +cmake -S . -B build -DMONTIS_BUILD_BUNDLED_PLUGIN=OFF +cmake --build build +``` + +To run via the CMake helper target: + +```sh +cmake --build build --target run +``` + +Note: the `run` target currently starts `arken` with `-s foot`, so you’ll want +`foot` installed (or adjust the target in `CMakeLists.txt`). + +### Using Your Own Plugin + +If you disable the bundled plugin (`-DMONTIS_BUILD_BUNDLED_PLUGIN=OFF`), you can +build and supply your own plugin `.so` at runtime. + +- Plugin ABI: `arken/include/plugin.h` (generated convenience header: `build/plugin_interface.h`) +- Optional bridge helpers: `erebor/include` + `build/erebor/liberebor.a` + +Runtime invocation looks like: + +```sh +./build/arken/arken -p /path/to/your_plugin.so +``` + +## Installing + +```sh +cmake --install build --prefix ~/.local +``` + +This installs: +- `arken` to `~/.local/bin` +- if `-DMONTIS_BUILD_BUNDLED_PLUGIN=ON`, the latest built plugin `.so` to `~/.local/lib` |