Installation¶
ProllyTree ships as a Rust crate, a Python package, and a CLI binary (git-prolly). Pick whichever entry point matches how you plan to use it — the underlying library is the same.
Requirements¶
- Rust: 1.75+ (edition 2021) — install via rustup.
- Python: 3.8+ if you want the Python bindings.
- Git: required for the
gitfeature and thegit-prollyCLI. - C toolchain: needed only if you enable the
rocksdb_storagefeature.
Rust crate¶
Add the dependency to Cargo.toml:
Opt in to Git-backed versioning, SQL, or RocksDB via feature flags:
| Feature | What it enables |
|---|---|
git |
Git-backed versioned storage, branching, merge, git-prolly CLI |
sql |
GlueSQL query interface, git-prolly sql … |
rocksdb_storage |
RocksDB NodeStorage backend |
python |
PyO3 extension module (only used by the Python build) |
tracing |
tracing instrumentation |
digest_base64 |
Base64 encoding for digests (on by default) |
The git and sql features are enabled by default.
git-prolly CLI¶
Install the CLI directly from crates.io:
Or build from source:
git clone https://github.com/zhangfengcdt/prollytree.git
cd prollytree
cargo build --release --features "git sql" --bin git-prolly
# Binary is at ./target/release/git-prolly
Verify:
See the CLI reference for every subcommand.
Python bindings¶
Install from PyPI:
Or build from source with maturin:
git clone https://github.com/zhangfengcdt/prollytree.git
cd prollytree
pip install maturin
# Build with the python + sql feature set
./python/build_python.sh --with-sql --install
# Or with every feature
./python/build_python.sh --all-features --install
Verify:
See the Python API reference and the Python examples for end-to-end usage.
Building the docs locally¶
The site is built with mkdocs-material. From a repo checkout:
pip install -r docs/requirements.txt
# Build the static site into ./site
mkdocs build
# Start the live-reload dev server
mkdocs serve
# Serve on a specific port
mkdocs serve -a 0.0.0.0:8080
The build is driven by mkdocs.yml at the repository root. Every page under docs/ is a plain Markdown file you can edit and preview live.
Troubleshooting¶
cargo installfails compilingrocksdb. Either drop therocksdb_storagefeature, or install the system C/C++ toolchain (build-essentialon Debian/Ubuntu,xcode-select --installon macOS).- Python import errors after
maturin build. Use a clean virtualenv:python -m venv .venv && source .venv/bin/activate, then re-run the install script. git-prollycomplains about missing git user config. Rungit config user.name "…"andgit config user.email "…"in the repo before committing.