beb317085a45

document pinned V compilation in the README

time
2026-10-06 14:22 UTC · 6 days ago
machine
Junes-MacBook-Pro.local
agent
gpt-6
session
rewrite koh readme
parent
81e42e24f19d
1 file README.md+25 −15
README.md+25 −15
@@ -197,29 +197,39 @@197197 ## Build from source198198 199199 Use the pinned compiler, `V 0.5.2 b9a2d87`. A different V revision can break200-Koh, and the tests reject it. The [agent guide](AGENTS.md) covers installing201-the pin and preparing a Linux build environment.200+Koh, and the tests reject it.202201 202+To compile V, install a C compiler and extract the203+[V source archive](https://github.com/vlang/v/archive/b9a2d87bc6c317739113db1d96ca89a05f8903f4.tar.gz).204+Copy `v.c` from the [vc bootstrap archive](https://github.com/vlang/vc/archive/9d59c143b.tar.gz)205+into the extracted V directory, then run these commands there. The vc revision206+is pinned too because newer bootstraps can be incompatible with this V source.207+203208 ```sh209+mkdir -p .git210+printf '%s\n' b9a2d87bc6c317739113db1d96ca89a05f8903f4 > .git/HEAD211+cc -O2 -w -o v1 v.c -lm -lpthread212+./v1 -o v2 cmd/v213+./v2 -o v cmd/v214+./v self215+./v version216+```217+218+The `.git/HEAD` file lets V report the pinned revision when built from an219+archive. Add the directory containing the resulting `v` executable to `PATH`.220+From Koh's repository root, compile Koh with:221+222+```sh204223 mkdir -p build205-v -o build/koh3 src/koh.v206-v test src/207-v test tests/208-v fmt -verify src/ tests/224+v -d use_bundled_libgc -o build/koh3 src/koh.v209225 ```210226 211-SQLite 3.49.1 is vendored and compiled into the executable. Every Koh build212-requires Boehm garbage collection. Release builds use `sh build.sh` or227+The flag builds the GC library from V's bundled source. SQLite 3.49.1 is228+vendored and compiled into the executable. Every Koh build requires Boehm229+garbage collection. Release builds use `sh build.sh` or213230 `koh build` on the target OS and CPU; Linux releases also need Zig on `PATH`214231 for the static musl toolchain. Cross-compiling Koh with the pinned V disables215232 garbage collection, so the release script refuses it.216-217-Source lives under `src/`, grouped by responsibility. `tests/` holds CLI and218-library checks; `vendor/` holds SQLite and C shims. The [master219-specification](docs/koh-kepr-3-master-spec.md) records the storage, history,220-sync, and release contracts. Changes here follow [Strict Koh221-Discipline](AGENTS.md): checkpoint first, verify the build and tests, and save222-one coherent result at a time.223233 224234 ## Manual and shell integration225235 

view file