| 1 | # Oak
|
| 2 |
|
| 3 | This repository is the open-source heart of [Oak](https://oakvcs.com): the
|
| 4 | reusable version-control library and the `oak` command-line client, developed
|
| 5 | together as a Cargo workspace.
|
| 6 |
|
| 7 | | Crate | Path | crates.io | What it is |
|
| 8 | |-------|------|-----------|------------|
|
| 9 | | `oakvcs-core` | [`core/`](core/) | [`oakvcs-core`](https://crates.io/crates/oakvcs-core) | The VCS foundation: BLAKE3 content hashing, content-defined chunking, diff/merge, the Blob/Manifest/Commit/Tree data model, and an optional client-side local repository (SQLite + git backends). |
|
| 10 | | `oakvcs-cli` | [`cli/`](cli/) | [`oakvcs-cli`](https://crates.io/crates/oakvcs-cli) | The `oak` binary that builds on `oakvcs-core`. |
|
| 11 |
|
| 12 | ## Using the library in your own project
|
| 13 |
|
| 14 | `oakvcs-core` is usable on its own β e.g. to build an Oak integration into
|
| 15 | another tool or engine. Pull in just the content-addressed data model and
|
| 16 | hashing (no SQLite/git) with default features off:
|
| 17 |
|
| 18 | ```toml
|
| 19 | [dependencies]
|
| 20 | oakvcs-core = { version = "0.95.0", default-features = false }
|
| 21 | ```
|
| 22 |
|
| 23 | The crate is published as `oakvcs-core` but imported as `oak_core`.
|
| 24 |
|
| 25 | Add the default `local-repo` feature when you also want the on-disk
|
| 26 | `Repository` (SQLite + read-only git) backends.
|
| 27 |
|
| 28 | ## Installing the CLI
|
| 29 |
|
| 30 | Oak is in **public beta** (v0.95.0). The quickest way in is the prebuilt
|
| 31 | `oak` binary:
|
| 32 |
|
| 33 | ```bash
|
| 34 | curl -fsSL oakvcs.com/install | sh
|
| 35 | ```
|
| 36 |
|
| 37 | The installer supports **macOS (Apple Silicon)** and **Linux (x86_64)**.
|
| 38 | After install, `oak upgrade` updates the binary in place.
|
| 39 |
|
| 40 | Prefer to build from crates.io? Install with Cargo instead:
|
| 41 |
|
| 42 | ```bash
|
| 43 | cargo install oakvcs-cli # builds and installs the `oak` binary
|
| 44 | ```
|
| 45 |
|
| 46 | ## Building from source
|
| 47 |
|
| 48 | ```bash
|
| 49 | cargo build --workspace # builds oak-core + the oak binary
|
| 50 | cargo test -p oakvcs-cli # CLI tests (incl. wiremock HTTP tests)
|
| 51 | make build # release build + the CLI release tooling
|
| 52 | ```
|
| 53 |
|
| 54 | The CLI depends on `oak-core` via an in-workspace path, so a plain
|
| 55 | `cargo build` works against the local `core/` checkout with no extra setup.
|
| 56 |
|
| 57 | ## License
|
| 58 |
|
| 59 | Apache-2.0. See [LICENSE](LICENSE).
|
| 60 |
|
| 61 |
|