style: adopt TigerStyle across src/; add docs/TIGER_STYLE.md
Wrap signatures and long expressions to the 100-column limit and make every file zig fmt clean. Semantics-preserving throughout: ignoring whitespace and the trailing commas that wrapping introduces, every file here is byte-identical to its predecessor, and the one apparent exception is a warning string split with `++`, which concatenates at comptime to the same bytes. src/index.zig and src/commands.zig are reformatted in the commits that follow, because their reformat is interleaved with in-flight changes to them and separating the two would need the reformat re-derived rather than moved.
This commit is contained in:
16
README.md
16
README.md
@@ -5,6 +5,13 @@ Zig 0.16. Like SQLite, it stores everything in a single file; unlike SQLite,
|
||||
it speaks the MongoDB wire protocol, so real clients — `mongosh`, the Node.js
|
||||
driver, PyMongo — connect over TCP and just work.
|
||||
|
||||
## Forward plan
|
||||
|
||||
The direction from this MVP — a full-fledged embedded, tens-of-GB,
|
||||
maximally MongoDB-compatible database — its decision record, milestones
|
||||
and gates live in [PLAN.md](PLAN.md). Milestone 0 (mmap + WAL storage
|
||||
foundation) is next.
|
||||
|
||||
## Quick start
|
||||
|
||||
```sh
|
||||
@@ -317,6 +324,9 @@ Several real bugs surfaced while benchmarking:
|
||||
|
||||
## Code style
|
||||
|
||||
Zig 0.16 idioms (`std.Io` threaded through everything, unmanaged
|
||||
containers); user-declared functions use `snake_case` per this repo's house
|
||||
style.
|
||||
The project follows TigerBeetle's TigerStyle — see
|
||||
[`docs/TIGER_STYLE.md`](docs/TIGER_STYLE.md) (binding reference) and the
|
||||
"Code style" section of `AGENTS.md` for the project-specific rules and
|
||||
deliberate deviations. Highlights: `zig fmt` clean, 100-column hard limit,
|
||||
4-space indent, snake_case, functions under 70 lines, always-on
|
||||
assertions via `src/assert.zig`.
|
||||
|
||||
Reference in New Issue
Block a user