安装
最快的试用方式是 CLI。应用集成时再加载 SQLite extension 或静态链接扩展。
安装 CLI
Section titled “安装 CLI”curl -fsSL https://raw.githubusercontent.com/eidos-space/graft/main/install.sh \ | GRAFT_VERSION=0.8.0 shgraft --version# graft 0.8.0也可以从 GitHub releases 下载预构建 archive。
从源码构建 CLI
Section titled “从源码构建 CLI”在仓库根目录:
cargo build -p graft-tool --bin graft --release生成位置:
target/release/graft加入 PATH:
mkdir -p ~/.local/binln -sf "$(pwd)/target/release/graft" ~/.local/bin/grafthash -rgraft --help构建 SQLite 扩展
Section titled “构建 SQLite 扩展”cargo build -p graft-ext --release平台相关的动态库会写入 target/release/。在 SQLite shell 中加载:
.load ./libgraft_ext只有应用明确需要 Graft VFS 作为 live page-storage 数据面时才需要扩展。 repository 命令不通过 SQLite PRAGMA 暴露;control plane 使用 CLI 及其 JSON 输出。
cd docspnpm installpnpm build下一步先跑 CLI 快速开始。需要显式接入可选 Graft VFS 时,再看 SQLite 扩展快速开始。