update documents

This commit is contained in:
Rongsong Shen 2026-08-10 17:51:51 +08:00
parent c705cadadc
commit d70bf6a402
51 changed files with 995 additions and 1997 deletions

View file

@ -1,29 +1,28 @@
# XCE Shared Library (libxce)
## Overview
Shared C library providing common utilities, data structures, and IPC primitives used by the controller, worker, and scheduler daemons.
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
# From workspace root
nix develop
meson build && ninja -C build
/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) and/or `libxce.so` (shared)
- 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 exposed via `src/include/xce/`
- 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)
- All public API headers go in `src/include/xce/` — not in `src/lib/`
- 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/xce/` — Public header files consumed by all components
- `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