From 403bcbbfdfe6bc46dc3933502836d29b18de3076 Mon Sep 17 00:00:00 2001 From: Arek Date: Sat, 13 Jun 2026 10:42:41 +0200 Subject: [PATCH] doc: Updates AGENTS.md --- AGENTS.md | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ba00389..aa5639b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,28 +1,24 @@ # wlgol -Simple implementation of Conway's Game of Life for Wayland. +Simple Wayland Game of Life in C11. Draws directly into a shared-memory buffer (no OpenGL/Vulkan). -It directly uses C interfaces of Wayland. +- Build definition: `CMakeLists.txt` +- Generated code: `xdg-shell.xml` is vendored; `wayland-scanner` produces `xdg-shell.h` and `xdg-shell.c` inside `build/` +- Source layout: `wlgol.c` is the entry point; `tkeyboard.c`, `tpointer.c`, `hashtable.c` are modules; headers live in `include/`; tests live in `tests/` -Uses pure C language in C11 standard. +## Dependencies -Draws directly into the buffer in a shared memory pool. Doesn't use interfaces like OpenGL, Vulkan etc. +Needs `cmake`, `ninja`, `pkg-config`, `wayland-scanner`, plus the runtime libraries `wayland-client`, `wayland-cursor`, and `xkbcommon`. -Build definition is in `CMakeFiles.txt`. +## Common commands -Uses `cmake` an `ninja` to build the program. - -## Useful commands: - -Init build environment: +Configure (from repo root): ```bash -mkdir build -cd build -cmake -G Ninja .. +cmake -G Ninja -B build ``` -Build programs: +Build: ```bash cmake --build ./build @@ -34,9 +30,20 @@ Run tests: ctest --test-dir build ``` -Run program: +Run a single test directly: + +```bash +./build/test_hashtable +``` + +Run the program (requires a running Wayland compositor): ```bash ./build/wlgol ``` +## Notes + +- `compile_commands.json` is generated automatically in the build directory because `CMAKE_EXPORT_COMPILE_COMMANDS` is set in `CMakeLists.txt`. +- The project currently has one CTest target named `Hashtable`. +