Agent Skillsjustrach/turboAPI › turbo-build

turbo-build

GitHub

编译 TurboAPI Zig 后端并安装,解决原生核心不可用或依赖哈希不匹配问题。

.claude/skills/turbo-build/SKILL.md justrach/turboAPI

触发场景

Turbonet 扩展需要重新编译 修改了 Zig 源代码后 遇到 Native core not available 错误

安装

npx skills add justrach/turboAPI --skill turbo-build -g -y
更多选项

非标准路径

npx skills add https://github.com/justrach/turboAPI/tree/main/.claude/skills/turbo-build -g -y

不安装直接使用

npx skills use justrach/turboAPI@turbo-build

指定 Agent (Claude Code)

npx skills add justrach/turboAPI --skill turbo-build -a claude-code -g -y

安装 repo 全部 skill

npx skills add justrach/turboAPI --all -g -y

预览 repo 内 skill

npx skills add justrach/turboAPI --list

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

  1. Build turbonet:
uv run --python 3.14t python zig/build_turbonet.py --install $ARGUMENTS
  1. 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 zig or download from ziglang.org

Build modes

  • --install: Copy .so into python/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

同 Skill 集合

.claude/skills/turbo-benchmark/SKILL.md
.claude/skills/turbo-db-route/SKILL.md
.claude/skills/turbo-route/SKILL.md
.claude/skills/turbo-test/SKILL.md
.claude/skills/turbopg/SKILL.md

元信息

文件数
0
版本
1c75a09
Hash
2523c468
收录时间
2026-07-25 10:01

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-02 00:50
浙ICP备14020137号-1 $访客地图$