# HG changeset patch # User MrJuneJune # Date 1769320334 28800 # Node ID b818a4561a3ca236ba94f120070b4baed90387a8 # Parent a06710325c30f21a1391ade9d3e6c36b9f32e362 Added AI genreated README.md. Needed to be read. diff -r a06710325c30 -r b818a4561a3c benchmark/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmark/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,13 @@ +# benchmark + +HTTP framework benchmarking tools and tests. + +## Contents + +- `bun-http-framework-benchmark/` - Forked benchmark suite for comparing HTTP frameworks + +## Usage + +```bash +bazel build //benchmark:... +``` diff -r a06710325c30 -r b818a4561a3c config/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,11 @@ +# config + +Shared Bazel build configurations and platform definitions. + +## Usage + +Reference in BUILD files: + +```starlark +load("//config:defs.bzl", ...) +``` diff -r a06710325c30 -r b818a4561a3c deita/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deita/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,33 @@ +# deita + +SQLite database wrapper library for C. + +## Features + +- Connection management +- Query building and execution +- Result handling + +## Files + +| File | Description | +|------|-------------| +| `deita.h` | Public API header | +| `deita_internal.h` | Internal declarations | +| `d_sqlite.c` | SQLite wrapper implementation | +| `d_connection.c` | Connection handling | +| `d_query.c` | Query execution | +| `deita_test.c` | Unit tests | + +## Usage + +```c +#include "deita/deita.h" +``` + +## Building + +```bash +bazel build //deita:deita +bazel test //deita:deita_test +``` diff -r a06710325c30 -r b818a4561a3c dowa/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dowa/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,43 @@ +# dowa + +Core utility library for C. Provides memory management, string operations, and math utilities. + +## Features + +- Arena allocator and memory utilities +- String builder and manipulation +- Math helpers +- stb_ds.h for dynamic arrays and hash maps + +## Files + +| File | Description | +|------|-------------| +| `dowa.h` | Public API header | +| `d_memory.c` | Memory management (arena allocator) | +| `d_string.c` | String utilities | +| `d_math.c` | Math helpers | +| `stb_ds.h` | STB dynamic structures | +| `dowa_test.c` | Unit tests | + +## Usage + +```c +#include "dowa/dowa.h" + +// Arena allocator +Arena arena = {0}; +char* str = arena_alloc(&arena, 100); +arena_free(&arena); + +// String builder +StringBuilder sb = {0}; +sb_append(&sb, "hello"); +``` + +## Building + +```bash +bazel build //dowa:dowa +bazel test //dowa:dowa_test +``` diff -r a06710325c30 -r b818a4561a3c graphics/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,8 @@ +# graphics + +Graphics experiments and WebGL demos. + +## Files + +- `index.html` - HTML entry point +- `index.js` - JavaScript graphics code diff -r a06710325c30 -r b818a4561a3c gui_ze/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gui_ze/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,29 @@ +# gui_ze + +Bazel rules for building GUI applications and web frontends. + +## Files + +| File | Description | +|------|-------------| +| `gui_ze.bzl` | Starlark rules for web/GUI builds | +| `time_to_first_byte.sh` | TTFB measurement script | + +## Rules + +Provides Bazel rules for: +- Bundling JavaScript/TypeScript with esbuild +- Building WASM modules with Emscripten +- Packaging web applications + +## Usage + +```starlark +load("//gui_ze:gui_ze.bzl", "web_bundle", "wasm_cc_binary") + +web_bundle( + name = "app", + entry_point = "src/main.tsx", + ... +) +``` diff -r a06710325c30 -r b818a4561a3c hg-web/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg-web/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,34 @@ +# hg-web + +A web-based Mercurial repository browser. Provides a GitHub-style interface for browsing files, viewing code with syntax highlighting, and reading markdown documentation. + +## Features + +- Browse repository files and directories +- View code files with syntax highlighting (highlight.js) +- Render markdown files with WASM-based converter +- Dark/light theme support with system preference detection +- Prefetch on hover for faster navigation + +## Structure + +``` +hg-web/ +├── BUILD # Bazel build configuration +├── deploy.sh # Deployment script +├── main.c # C server handling API routes +└── src/ # Frontend source files +``` + +## Building + +```bash +bazel build //hg-web:hg_web +``` + +## API Endpoints + +The C server (`main.c`) provides: + +- `GET /api/repo/list?path=` - List directory contents +- `GET /api/repo/file?path=` - Fetch file contents diff -r a06710325c30 -r b818a4561a3c hg-web/src/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg-web/src/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,30 @@ +# src + +Frontend source files for the Mercurial repository browser. + +## Files + +| File | Description | +|------|-------------| +| `repo-browser.tsx` | Main React component for the repository browser UI | +| `main.tsx` | React entry point, renders RepoBrowser | +| `index.html` | HTML template | +| `index.js` | JavaScript entry point | +| `index.css` | highlight.js theme styles | +| `base.css` | Base/reset styles | +| `build.ts` | esbuild configuration for bundling | + +## Components (repo-browser.tsx) + +- `RepoBrowser` - Main app component with routing and state +- `FileList` - Renders directory listing +- `FileRow` - Individual file/folder row with prefetch on hover +- `FileViewer` - Modal for viewing code files with syntax highlighting +- `MarkdownViewerModal` - Modal for rendered markdown files +- `ReadmeViewer` - Inline README.md display +- `Breadcrumb` - Navigation breadcrumb +- `GlobalStyles` - CSS-in-JS with dark/light theme support + +## Subdirectories + +- `icons/` - Static icon assets diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg-web/src/icons/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,29 @@ +# icons + +Static icon assets for the repository browser UI. + +## Files + +| File | Description | Source | +|------|-------------|--------| +| `folder.png` | Directory/folder icon | Flaticon | +| `file.svg` | Generic file icon | VSCode Material Icon Theme | +| `home.png` | Home navigation icon | Flaticon | +| `repo.svg` | Repository icon (git branch style) | Custom | +| `close.png` | Modal close button icon | Flaticon | + +## Usage + +Icons are served as static files at `/icons/` and referenced in `repo-browser.tsx`: + +```typescript +const ICONS = { + folder: "/icons/folder.png", + file: "/icons/file.svg", + home: "/icons/home.png", + repo: "/icons/repo.svg", + close: "/icons/close.png" +}; +``` + +Add to Bazel filegroup for serving. diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/close.png Binary file hg-web/src/icons/close.png has changed diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/file.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg-web/src/icons/file.svg Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/folder.png Binary file hg-web/src/icons/folder.png has changed diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/home.png Binary file hg-web/src/icons/home.png has changed diff -r a06710325c30 -r b818a4561a3c hg-web/src/icons/repo.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hg-web/src/icons/repo.svg Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,4 @@ + + + + diff -r a06710325c30 -r b818a4561a3c load_test/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/load_test/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,7 @@ +# load_test + +Load testing and performance measurement scripts. + +## Files + +- `main.py` - Python load testing script diff -r a06710325c30 -r b818a4561a3c markdown_converter/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/markdown_converter/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,52 @@ +# markdown_converter + +Markdown to HTML converter written in C, with WASM support for browser use. + +## Features + +- Headings, paragraphs, lists +- Code blocks with syntax highlighting +- Links and images +- Bold, italic, inline code +- Blockquotes + +## Files + +| File | Description | +|------|-------------| +| `markdown_to_html.h` | Public API header | +| `markdown_to_html.c` | C implementation | +| `markdown_to_html.js` | JavaScript wrapper for WASM | +| `markdown_to_html.css` | Default styles | +| `tests/` | Test cases | + +## Usage (C) + +```c +#include "markdown_converter/markdown_to_html.h" + +char* html = markdown_to_html(markdown_string); +// use html... +markdown_free(html); +``` + +## Usage (WASM/JavaScript) + +```javascript +import createModule from 'markdown_converter/markdown_to_html_wasm/markdown_to_html_bin.js'; + +const Module = await createModule(); +const toHtml = Module.cwrap('markdown_to_html', 'number', ['string']); +const free = Module.cwrap('markdown_free', null, ['number']); + +const ptr = toHtml(markdownString); +const html = Module.UTF8ToString(ptr); +free(ptr); +``` + +## Building + +```bash +bazel build //markdown_converter:markdown_to_html +bazel build //markdown_converter:markdown_to_html_wasm # WASM version +``` diff -r a06710325c30 -r b818a4561a3c npc/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/npc/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,13 @@ +# npc + +NPC/character system application. + +## Files + +- `main.c` - Main application code + +## Building + +```bash +bazel build //npc:npc +``` diff -r a06710325c30 -r b818a4561a3c postdog/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/postdog/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,30 @@ +# postdog + +GUI application built with raylib. HTTP client with a graphical interface (like Postman). + +## Features + +- HTTP request builder +- Response viewer +- Request history + +## Files + +| File | Description | +|------|-------------| +| `main.c` | Main application | +| `gui_window_file_dialog.h` | File dialog implementation | +| `Roboto-Regular.ttf` | UI font | +| `epi_all_colors.png` | Logo | +| `history/` | Saved request history | + +## Building + +```bash +bazel build //postdog:postdog +bazel run //postdog:postdog +``` + +## Dependencies + +- raylib (via //third_party/raylib) diff -r a06710325c30 -r b818a4561a3c seobeo/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/seobeo/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,49 @@ +# seobeo + +HTTP client and networking library for C. + +## Features + +- HTTP/HTTPS client +- SSL/TLS support +- Async networking with libuv +- Snapshot testing utilities + +## Files + +| File | Description | +|------|-------------| +| `seobeo.h` | Public API header | +| `seobeo_internal.h` | Internal declarations | +| `s_http_client.c` | HTTP client implementation | +| `s_network.c` | Network utilities | +| `s_ssl.c` | SSL/TLS handling | +| `s_logging.c` | Logging utilities | +| `snapshot_creator.c/h` | Snapshot testing | +| `docs/` | Documentation | +| `examples/` | Usage examples | +| `tests/` | Unit tests | +| `os/` | OS-specific code | + +## Usage + +```c +#include "seobeo/seobeo.h" + +// Make HTTP request +HttpResponse* resp = http_get("https://example.com"); +// handle response... +http_response_free(resp); +``` + +## Building + +```bash +bazel build //seobeo:seobeo +bazel test //seobeo:seobeo_test +``` + +## Dependencies + +- libuv (via //third_party/libuv) +- OpenSSL diff -r a06710325c30 -r b818a4561a3c sori/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sori/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,13 @@ +# sori + +Audio library for C. + +## Files + +- `main.c` - Audio implementation + +## Building + +```bash +bazel build //sori:sori +``` diff -r a06710325c30 -r b818a4561a3c third_party/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/third_party/README.md Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,26 @@ +# third_party + +External dependencies and libraries. + +## Contents + +| Directory | Description | +|-----------|-------------| +| `bun/` | Bun JavaScript runtime | +| `emsdk/` | Emscripten SDK for WASM compilation | +| `highlight/` | highlight.js for syntax highlighting | +| `libuv/` | Async I/O library | +| `luajit/` | LuaJIT interpreter | +| `raylib/` | Game/GUI library | +| `sqlite3/` | SQLite database | +| `wrk/` | HTTP benchmarking tool | + +## Usage + +Reference in BUILD files: + +```starlark +deps = ["//third_party/sqlite3:sqlite3"] +deps = ["//third_party/raylib:raylib"] +deps = ["//third_party/libuv:libuv"] +``` diff -r a06710325c30 -r b818a4561a3c third_party/highlight/languages/shell.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/third_party/highlight/languages/shell.js Sat Jan 24 21:52:14 2026 -0800 @@ -0,0 +1,31 @@ +/* +Language: Shell Session +Requires: bash.js +Author: TSUYUSATO Kitsune +Category: common +Audit: 2020 +*/ + +/** @type LanguageFn */ +export default function(hljs) { + return { + name: 'Shell Session', + aliases: [ + 'console', + 'shellsession' + ], + contains: [ + { + className: 'meta.prompt', + // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result. + // For instance, in the following example, it would match "echo /path/to/home >" as a prompt: + // echo /path/to/home > t.exe + begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/, + starts: { + end: /[^\\](?=\s*$)/, + subLanguage: 'bash' + } + } + ] + }; +}