ADR-0014: nilorea-library used as a source tree
Records how OKLM consumes nilorea-library: by compiling the source files of the modules it needs, not by linking a prebuilt library or vendoring a submodule.
Status: accepted (2026-10-29).
Context
nilorea-library is OKLM's mandatory base. It is developed alongside
OKLM by the same author, and OKLM may add code to it (the persistent
worker team of ADR-0016 was added for OKLM). A git submodule pins a
commit and makes changes made for OKLM a two-step publish; linking an
installed libnilorea.a couples OKLM to however nilorea was
configured and built.
Decision
- The Makefile takes the nilorea tree from
NILOREA_DIR, defaulting toexternal/nilorea-librarywhen present and to../../nilorea-libraryotherwise. - OKLM compiles only the nilorea modules it uses
(
NILOREA_SRCSin the Makefile: currentlyn_log,n_list,n_time,n_thread_pool) into its own build directory, and archives them intoliboklm.a. - They are compiled with nilorea's own dialect
(
-std=gnu17), without-Werror, and with OKLM's sanitizer flags so ASan/TSan builds are consistent. nilorea headers are included with-isystemso OKLM's-pedantic -Werrordoes not apply to them. - Improvements needed by OKLM are made in nilorea itself, with nilorea's tests and conventions, never patched locally.
Consequences
OKLM always builds against the nilorea tree it is pointed at; a release must record the nilorea commit it was built with. Adding a nilorea module is a one-line Makefile change (plus its own nilorea dependencies).