comparison dowa/README.md @ 195:f8f5004a920a

Merging back hg-web-tip
author MrJuneJune <me@mrjunejune.com>
date Tue, 27 Jan 2026 06:51:44 -0800
parents b818a4561a3c
children
comparison
equal deleted inserted replaced
189:14cc84ba35a0 195:f8f5004a920a
1 # dowa
2
3 Core utility library for C. Provides memory management, string operations, and math utilities.
4
5 ## Features
6
7 - Arena allocator and memory utilities
8 - String builder and manipulation
9 - Math helpers
10 - stb_ds.h for dynamic arrays and hash maps
11
12 ## Files
13
14 | File | Description |
15 |------|-------------|
16 | `dowa.h` | Public API header |
17 | `d_memory.c` | Memory management (arena allocator) |
18 | `d_string.c` | String utilities |
19 | `d_math.c` | Math helpers |
20 | `stb_ds.h` | STB dynamic structures |
21 | `dowa_test.c` | Unit tests |
22
23 ## Usage
24
25 ```c
26 #include "dowa/dowa.h"
27
28 // Arena allocator
29 Arena arena = {0};
30 char* str = arena_alloc(&arena, 100);
31 arena_free(&arena);
32
33 // String builder
34 StringBuilder sb = {0};
35 sb_append(&sb, "hello");
36 ```
37
38 ## Building
39
40 ```bash
41 bazel build //dowa:dowa
42 bazel test //dowa:dowa_test
43 ```