Agent Skills
› justrach/turboAPI
› turbo-build
turbo-build
GitHub编译 TurboAPI Zig 后端并安装,解决原生核心不可用或依赖哈希不匹配问题。
触发场景
Turbonet 扩展需要重新编译
修改了 Zig 源代码后
遇到 Native core not available 错误
安装
npx skills add justrach/turboAPI --skill turbo-build -g -y
SKILL.md
Frontmatter
{
"name": "turbo-build",
"description": "Build the TurboAPI Zig native backend. Use when the turbonet extension needs to be recompiled, after changing Zig source files, or when seeing \"Native core not available\".",
"argument-hint": [
"--release"
],
"disable-model-invocation": true
}
Build TurboAPI Zig Backend
Steps
- Build turbonet:
uv run --python 3.14t python zig/build_turbonet.py --install $ARGUMENTS
- Verify the build:
uv run --python 3.14t python -c "from turboapi import turbonet; print(turbonet.hello())"
Dependencies (auto-fetched via build.zig.zon)
- dhi (justrach/dhi) — Zig-native JSON validation
- pg.zig (justrach/pg.zig) — Zig-native Postgres client with SIMD + pgvector
Common issues
- "Native core not available": Rebuild with the command above
- dhi hash mismatch:
cd zig && zig fetch --save "https://github.com/justrach/dhi/archive/refs/heads/main.tar.gz" - pg.zig hash mismatch:
cd zig && zig fetch --save "git+https://github.com/justrach/pg.zig#master" - Missing Python 3.14t:
uv python install 3.14t - Missing Zig 0.15+:
brew install zigor download from ziglang.org
Build modes
--install: Copy .so intopython/turboapi/(required for dev)--release: ReleaseFast optimizations (for benchmarks/production)- No flags: Compile check only
What gets built
Output: python/turboapi/turbonet.{suffix}.so containing:
- HTTP server (server.zig) — 24-thread pool, keep-alive, CORS
- Router (router.zig) — radix trie with path params + wildcards
- dhi validator (dhi_validator.zig) — pre-GIL JSON validation
- DB layer (db.zig) — pg.zig pool, cache, prepared statements
- pg.zig fork — SIMD JSON escaping, pgvector, writeJsonRow
版本历史
- 0ef167c 当前 2026-07-25 10:01


