Skip to content

Commit b564e7a

Browse files
NathanFlurryclaude
andcommitted
refactor: remove vendored C libs, delete fake git/make reimplementations
- Delete 477K lines of vendored C source (sqlite3, zlib, minizip, cJSON, libcurl) - Delete Ralph's clean-room git.c (2925 lines) and make.c (1864 lines) which violated Tool Integration Policy - Delete git.test.ts, git-remote.test.ts, make.test.ts (tests for fake impls) - Push modified libcurl (with WASI patches) to rivet-dev/secure-exec-curl - Add fetch-libs Makefile target to download libs at build time: - sqlite3 from sqlite.org - zlib from GitHub - cJSON from GitHub - libcurl from rivet-dev/secure-exec-curl - Add C Library Vendoring Policy to CLAUDE.md - Mark git/make stories (US-083–085, US-090–095) as passes:false in prd.json - libs/ and .cache/ added to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 36720ea commit b564e7a

File tree

413 files changed

+526
-483515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+526
-483515
lines changed

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@
4040
- if the upstream cannot compile or link for the target, document the specific blockers and leave the story as failing — do not mark it passing with a placeholder
4141
- the PRD and story notes define which upstream project to use; follow them exactly unless explicitly told otherwise
4242

43+
## C Library Vendoring Policy
44+
45+
- NEVER commit third-party C library source code directly into this repo
46+
- **unmodified upstream libraries** (sqlite3, zlib, minizip, cJSON, etc.) must be downloaded at build time from their official release URLs — add a Makefile target in `wasmvm/c/Makefile` under `fetch-libs`
47+
- **modified libraries** (e.g., libcurl with WASI patches) must live in a fork under the `rivet-dev` GitHub org (e.g., `rivet-dev/secure-exec-curl`) — the Makefile downloads from the fork's archive URL
48+
- all downloaded library sources go in `wasmvm/c/libs/` which is gitignored — they are fetched by `make fetch-libs` and cached in `wasmvm/c/.cache/`
49+
- when adding a new C library dependency: (1) add its download URL and Makefile target to `fetch-libs`, (2) add `libs/<name>` to the appropriate `.gitignore`, (3) if WASI modifications are needed, create a `rivet-dev/secure-exec-<name>` fork first
50+
- existing forks: `rivet-dev/secure-exec-curl` (libcurl with `wasi_tls.c` and `wasi_stubs.c`)
51+
4352
## WASM Binary
4453

4554
- the goal for WasmVM is full POSIX compliance 1:1 — every command, syscall, and shell behavior should match a real Linux system exactly

docs-internal/proposal-kernel-consolidation.md

Lines changed: 417 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)