doc: Updates AGENTS.md
This commit is contained in:
@@ -1,28 +1,24 @@
|
|||||||
# wlgol
|
# 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.
|
Configure (from repo root):
|
||||||
|
|
||||||
## Useful commands:
|
|
||||||
|
|
||||||
Init build environment:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir build
|
cmake -G Ninja -B build
|
||||||
cd build
|
|
||||||
cmake -G Ninja ..
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Build programs:
|
Build:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake --build ./build
|
cmake --build ./build
|
||||||
@@ -34,9 +30,20 @@ Run tests:
|
|||||||
ctest --test-dir build
|
ctest --test-dir build
|
||||||
```
|
```
|
||||||
|
|
||||||
Run program:
|
Run a single test directly:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./build/test_hashtable
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the program (requires a running Wayland compositor):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./build/wlgol
|
./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`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user