You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,22 +86,23 @@ Please do not add dependencies without prior discussion.
86
86
87
87
- Zig version: 0.16.0 (as declared in `build.zig.zon` and the Makefile's `ZIG_LOCAL` path).
88
88
- Formatting is enforced by `zig fmt`. Run `make format` before committing.
89
-
- Naming follows Zig standard-library conventions: `camelCase` for functions (e.g. `getPtr`, `keysWithPrefix`), `snake_case` for local variables and struct fields, `PascalCase` for types and structs, and `SCREAMING_SNAKE_CASE` for top-level compile-time constants.
89
+
- Naming follows Zig standard-library conventions: `camelCase` for functions (e.g. `getPtr`, `keysWithPrefix`), `snake_case` for local variables and
90
+
struct fields, `PascalCase` for types and structs, and `SCREAMING_SNAKE_CASE` for top-level compile-time constants.
| Single example |`make run EXAMPLE=e1_btree_map`| Builds and runs one example program|
101
+
| All examples |`make run`| Builds and runs every example under `examples/`|
102
+
| Single benchmark|`make bench BENCHMARK=b1_btree_map`| Builds (ReleaseFast) and runs one benchmark program|
103
+
| All benchmarks |`make bench`| Builds and runs every benchmark under `benches/`|
104
+
| Docs |`make docs`| Generates API docs into `docs/api`|
105
+
| Everything |`make all`| Runs `build`, `test`, `lint`, and `docs`|
105
106
106
107
## First Contribution Flow
107
108
@@ -120,9 +121,12 @@ Good first tasks:
120
121
121
122
## Testing Expectations
122
123
123
-
- Unit and regression tests live as inline `test` blocks in the module they cover (`src/lib.zig` and `src/ordered/*.zig`). There is no separate `tests/` directory.
124
-
- Tests are discovered automatically via `std.testing.refAllDecls(@This())` in `src/lib.zig`, so new `test` blocks only need to live in a module that is reachable from `lib.zig`.
125
-
- Every new public function or container branch must ship with at least one `test` block that exercises it, including the error paths where applicable.
124
+
- Unit and regression tests live as inline `test` blocks in the module they cover (`src/lib.zig` and `src/ordered/*.zig`). There is no separate
125
+
`tests/` directory.
126
+
- Tests are discovered automatically via `std.testing.refAllDecls(@This())` in `src/lib.zig`, so new `test` blocks only need to live in a module that
127
+
is reachable from `lib.zig`.
128
+
- Every new public function or container branch must ship with at least one `test` block that exercises it, including the error paths where
129
+
applicable.
126
130
- Memory tests should use `std.testing.allocator` so leaks are caught automatically.
127
131
- No public API change is complete without a test covering the new or changed behavior.
0 commit comments