29 lines
1.4 KiB
Markdown
29 lines
1.4 KiB
Markdown
# XCE Shared Library (libxce)
|
|
|
|
## Overview
|
|
Shared C library providing common utilities, data structures, and IPC primitives used by the controller, worker, and scheduler daemons, plus the Go apiserver (via CGO, for IPC with the controller).
|
|
|
|
## Build
|
|
```bash
|
|
/xce-build lib # debug + ASAN + clean build + runs tests
|
|
```
|
|
For full build system details, see `.kiro/steering/build-deployment.md`.
|
|
|
|
## Architecture
|
|
- Produces `libxce.a` (static only — the `shared_library('xce', ...)` target in `meson.build` is currently commented out; no `.so` is built)
|
|
- Linked by all C system components: controller, worker, scheduler
|
|
- Public headers consumed by all components live flat in `src/include/` (e.g. `client.h`, `netio.h`, `request.h`, `vtaskmgr.h`, `persist.h`); only a handful of headers (`client_failover.h`, `cluster.h`, `cluster_def.h`, `errnox.h`, `types.h`) live under `src/include/xce/`
|
|
- Test suite in `src/lib/testsuite/`
|
|
|
|
## Conventions
|
|
- C standard: gnu17
|
|
- Format with `clang-format` (config at repo root if present)
|
|
- Public API headers go in `src/include/` (most headers) or `src/include/xce/` (a small legacy subset) — not in `src/lib/`
|
|
- Implementation files stay in `src/lib/`
|
|
|
|
## Key Files
|
|
- `src/include/` — Public header files consumed by all components (`src/include/xce/` holds a small legacy subset)
|
|
- `src/lib/testsuite/` — Library unit tests
|
|
|
|
## See Also
|
|
- Root guidelines: `CLAUDE.md` (repo root)
|