8000 docs: Phase 8 complete — v1.0.0 docs sync, version bumps, platform READMEs by adityamukho · Pull Request #223 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Minigraf Benchmarks

## Phase 8 Note

Phase 8 (v0.20.0–v1.0.0) added cross-platform targets: Browser WASM, WASI, Android, iOS,
Python, Node.js, Java, and C bindings. No changes were made to the native query or storage path.
All benchmark numbers below are unchanged from Phase 7 (v0.19.0).

**Live benchmark history**: [https://bencher.dev/perf/minigraf/plots](https://bencher.dev/perf/minigraf/plots)

Benchmark results for Minigraf. Core query benchmarks were updated in v0.13.1 (Phase 7.4 — query path snapshot fix). New benchmark groups for window functions, temporal metadata, UDFs, count-distinct, and regex filter added in v0.17.0 (Phase 7.8). Negation, disjunction, aggregation, and expression benchmarks were first run on v0.13.0 and selectively re-run on v0.13.1. Throughput reporting (facts/sec, aggregate ops/sec), retraction benchmarks, prepared query benchmarks, and checkpoint@1M added in v0.20.1.
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.0 — Phase 8 Complete (2026-05-01)

### Milestone

This is the **v1.0.0 release**. The public Rust API and the `.graph` file format are now stable
and committed to semantic versioning. File format stability is guaranteed from this release.

### Phase 8 summary

All Phase 8 cross-platform targets have shipped:

- **8.1a** — Browser WASM (`BrowserDb`, `IndexedDbBackend`, `@minigraf/browser` on npm) — v0.20.0
- **8.1b** — Server-side WASM (`wasm32-wasip1` / WASI, Wasmtime/Wasmer CI) — v0.20.0
- **8.2** — Mobile bindings (Android `.aar` on GitHub Packages, iOS `.xcframework` via SPM, UniFFI) — v0.21.0
- **8.3a** — Python (`minigraf` on PyPI, pre-built wheels) — v0.22.0
- **8.3b** — Java/JVM (`io.github.adityamukho:minigraf-jvm` on Maven Central, fat JAR) — v0.23.0
- **8.3c** — C FFI (`minigraf.h` + platform tarballs on GitHub Releases) — v0.24.0
- **8.3d** — Node.js (`minigraf` on npm, pre-built `.node` binaries) — v0.25.0

### Also in this release

- `pkg/` renamed to `minigraf-wasm/`, `swift/` renamed to `minigraf-swift/` — consistent
top-level naming across all workspace packages (issue #179)
- `@minigraf/browser` now published to npm on every tagged release (issue #179)
- `@minigraf/wasi` published to npm on every tagged release (issue #178) — WASI binary packaged for Node.js WASI consumers
- Per-platform READMEs added: `minigraf-wasm/`, `minigraf-node/`, `minigraf-ffi/python/`,
`minigraf-c/`, `minigraf-ffi/java/`

### Tests

795 tests passing (788 passing + 7 ignored: confirmed `or`+neg-cycle stratification bug,
deferred to post-1.0 backlog).

## v0.25.0 — 2026-04-26

### Added
Expand Down
7 changes: 6 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ See `TEST_COVERAGE.md` for the full per-file breakdown.

## Key Files for the Next Phase

See `ROADMAP.md` for the current next phase spec, including the relevant files and implementation details.
Phase 8 is complete — v1.0.0 released. Phase 9 (Ecosystem & Tooling) is next.

Phase 9 relevant areas (see `ROADMAP.md` for full spec):
- `examples/` — end-to-end annotated examples (agentic memory, offline-first mobile, browser PWA)
- `.wiki/` — cookbook-style guides for each Phase 9 deliverable
- `BENCHMARKS.md` — post-1.0 performance baseline updates

## Testing Conventions

Expand Down
44 changes: 10 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Thank you for your interest in contributing. Minigraf is a hobby project with a
- Performance improvements with benchmarks showing the gain
- Documentation improvements and example additions
- Test coverage improvements (especially error-path coverage)
- Cross-platform compatibility fixes (Linux, macOS, Windows, eventually WASM/mobile)
- Cross-platform compatibility fixes (Linux, macOS, Windows, WASM, mobile, language bindings)

## What We Will Not Merge

Expand Down Expand Up @@ -69,7 +69,7 @@ Run branch coverage and open the HTML report:
cargo llvm-cov --branch --open
```

The Phase 7.5 target is ≥90% branch coverage on `src/query/datalog/` modules. Re-run after adding tests to confirm progress.
Run branch coverage to check overall project health before submitting a PR.

## Code Standards

Expand Down Expand Up @@ -101,40 +101,16 @@ Before submitting, ask yourself:

If you answer "yes" to the last two questions, reconsider. If in doubt, open an issue and discuss first.

## Pre-Publishing Checklist (crates.io)
## Release Process

**Do not publish before Phase 7.8.** Before publishing, verify all of the following:
Releases are managed by the project maintainer. The process is documented in issue #133 and the
`docs/superpowers/specs/` design files. For each release:

### Minimum Bar
- [x] Phase 6.4 benchmarks complete (`BENCHMARKS.md`)
- [x] Phase 6.5 complete — on-disk B+tree, file format v6
- [x] Phase 7.1 complete — stratified negation, 407 tests passing
- [ ] Checkpoint-during-crash recovery exercised (Phase 7.5)
- [ ] Error-path coverage ≥90% (currently ~82%) (Phase 7.5)
- [x] GitHub Discussions enabled

### API Cleanup (Phase 7.8)
- [ ] Narrow `lib.rs` exports — expose only `Minigraf`, `WriteTransaction`, and query/result types; hide `PersistentFactStorage`, `FileHeader`, `PAGE_SIZE`, `Repl`, `Wal`, etc.
- [x] Remove dead `clap` dependency ✅

### Crate Metadata (`Cargo.toml`)
- [x] `repository`, `keywords`, `categories`, `readme`, `documentation` fields set
- [ ] Verify `description` is accurate and compelling (Phase 7.8)

### Documentation (Phase 7.8)
- [ ] All public API items have rustdoc comments with examples
- [ ] `README.md` quick-start example compiles and runs
- [ ] `CHANGELOG.md` up to date

### Quality Gates (Phase 7.8)
- [ ] `cargo test` passes on Linux, macOS, Windows (CI matrix)
- [ ] `cargo clippy -- -D warnings` passes
- [ ] `cargo doc --no-deps` builds without warnings
- [ ] No `unwrap()`/`expect()` in library code paths (tests and binary are fine)

### Versioning
- [ ] Publish as `0.x` — no backwards-compat promise until v1.0.0 (Phase 7.8)
- [ ] Stable API target is v1.0.0 — after Phase 8 cross-platform work
1. All prerequisite issue PRs merged and CI green
2. Version bumped consistently across all manifests (`Cargo.toml`, `package.json`, `pyproject.toml`, `build.gradle.kts`, `Package.swift`)
3. `cargo check --workspace` passes cleanly
4. All docs synced (see `CLAUDE.md` — "Sync all docs at phase completion")
5. Tag pushed — CI publishes to crates.io, PyPI, npm, and Maven Central automatically

## Code of Conduct

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[package]
name = "minigraf"
version = "0.25.0"
version = "1.0.0"
edition = "2024"
description = "Zero-config, single-file, embedded graph database with bi-temporal Datalog queries"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ let package = Package(
.binaryTarget(
name: "minigrafFFI",
// Updated by CI: release-upload-mobile job
url: "https://github.com/project-minigraf/minigraf/releases/download/v0.20.1/MinigrafKit-v0.20.1.xcframework.zip",
checksum: "0000000000000000000000000000000000000000000000000000000000000000"
url: "https://github.com/project-minigraf/minigraf/releases/download/v1.0.0/MinigrafKit-v1.0.0.xcframework.zip",
checksum: "PLACEHOLDER — replace with SHA256 of MinigrafKit-v1.0.0.xcframework.zip after CI produces the artifact"
),
.target(
name: "MinigrafKit",
Expand Down
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Coverage](https://codecov.io/gh/project-minigraf/minigraf/branch/main/graph/badge.svg)](https://codecov.io/gh/project-minigraf/minigraf)
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](https://github.com/project-minigraf/minigraf#license)
[![Rust Edition](https://img.shields.io/badge/rust-2024-orange.svg)](https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html)
[![Phase](https://img.shields.io/badge/phase-8.3c%20complete-blue.svg)](https://github.com/project-minigraf/minigraf/blob/main/ROADMAP.md)
[![Release](https://img.shields.io/badge/release-v1.0.0-blue.svg)](https://github.com/project-minigraf/minigraf/releases/tag/v1.0.0)

> **Embedded graph memory for AI agents, mobile apps, and the browser** — the SQLite of bi-temporal graph databases

Expand Down Expand Up @@ -40,7 +40,7 @@ Minigraf is a **single-file embedded graph database** that lets you:

```toml
[dependencies]
minigraf = "0.21"
minigraf = "1.0"
```

Or via cargo:
Expand Down Expand Up @@ -91,7 +91,7 @@ let r2 = pq.execute(&[("tx", BindValue::TxCount(2)), ("entity", BindValue::Entit

```bash
cargo run # interactive Datalog REPL
cargo test # run 780 tests
cargo test # run 795 tests
cargo run < demos/demo_recursive.txt # recursive rules demo
```

Expand All @@ -113,7 +113,21 @@ No other database offers this combination:
| **Embedded** | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
| **Graph Native** | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |
| **Rust** | ✅ Yes | ❌ Clojure | ✅ Yes | ❌ Java | ❌ C |
| **WASM Ready** | ✅ Phase 8.1a/b | ❌ No | ⚠️ Limited | ❌ No | ✅ Yes |
| **WASM Ready** | ✅ Yes (browser + WASI + 6 targets) | ❌ No | ⚠️ Limited | ❌ No | ✅ Yes |

## Platform support

| Platform | Package | Install |
|---|---|---|
| Rust (native) | `minigraf` on crates.io | `cargo add minigraf` |
| Browser WASM | `@minigraf/browser` on npm | `npm install @minigraf/browser` |
| WASI | `@minigraf/wasi` on npm, `.wasm` on GitHub Releases | `npm install @minigraf/wasi` |
| Node.js | `minigraf` on npm | `npm install minigraf` |
| Python | `minigraf` on PyPI | `pip install minigraf` |
| Java/JVM | `io.github.adityamukho:minigraf-jvm` on Maven Central | see [wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases) |
| Android | `.aar` on GitHub Packages | see [wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases) |
| iOS / macOS | `.xcframework` via Swift Package Manager | see [wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases) |
| C / FFI | header + tarball on GitHub Releases | see [wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases) |

**Embedded graph memory for agents, mobile, and the browser — SQLite's simplicity + Datomic's temporal model.**

Expand Down Expand Up @@ -147,16 +161,20 @@ See the [Mobile Integration](https://github.com/project-minigraf/minigraf/wiki/U

### For WASM / Browser

Phase 8.1a complete: IndexedDB backend, `wasm-pack` packaging. Phase 8.1b complete: server-side WASM via `wasm32-wasip1` / WASI (Wasmtime, Wasmer). npm release as `@minigraf/browser` planned for Phase 8.2.
Published as [`@minigraf/browser`](https://www.npmjs.com/package/@minigraf/browser) on npm (IndexedDB-backed, `wasm-pack`). WASI build (`wasm32-wasip1`) available as [`@minigraf/wasi`](https://www.npmjs.com/package/@minigraf/wasi) on npm and as a GitHub Releases artifact (Wasmtime / Wasmer). See the [Use Cases wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases).

See the [Use Cases](https://github.com/project-minigraf/minigraf/wiki/Use-Cases) wiki page for detailed guides on all three targets.
### For Python / Node.js / Java / C

Language bindings ship as `minigraf` on PyPI, `minigraf` on npm (Node.js native addon), `io.github.adityamukho:minigraf-jvm` on Maven Central, and a C header + prebuilt shared library on GitHub Releases. See the [Use Cases wiki](https://github.com/project-minigraf/minigraf/wiki/Use-Cases).

## Scope

Minigraf runs as:
- ✅ An embedded library
- ✅ A standalone binary (interactive REPL)
- ✅ A WebAssembly module — browser (`wasm32-unknown-unknown`) and server-side WASI (`wasm32-wasip1`) (Phase 8.1a/b complete)
- ✅ Browser WASM — `@minigraf/browser` (IndexedDB-backed, `wasm-pack`)
- ✅ Server-side WASM — `wasm32-wasip1` / WASI (Wasmtime, Wasmer, Cloudflare Workers)
- ✅ Android, iOS, Python, Node.js, Java, C — via UniFFI / napi-rs / cbindgen

Minigraf will **not** be (by design):
- **Distributed** — no clustering, no sharding, no replication; each agent instance owns its own `.graph` file
Expand Down
58 changes: 31 additions & 27 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,11 @@ The query optimizer uses selectivity estimates to pick join order. Different `:a

---

## Phase 8: Cross-Platform Expansion 🔄 IN PROGRESS
## Phase 8: Cross-Platform Expansion ✅ COMPLETE

**Goal**: WASM, mobile, language bindings

**Status**: 🔄 In Progress (Phase 8.1 complete — v0.20.0)
**Status**: ✅ Completed (May 2026) — v1.0.0

**Priority**: 🟢 Medium

Expand Down Expand Up @@ -1203,7 +1203,9 @@ cargo build --target wasm32-wasip1 --release

**Deliverable**: ✅ Minigraf `.wasm` binary runs under Wasmtime/Wasmer with file-backed storage; suitable for use in Cloudflare Workers (WASI) and similar edge runtimes

### 8.2 Mobile Bindings
### 8.2 Mobile Bindings ✅ COMPLETE

**Status**: ✅ Completed (April 2026) — v0.21.0

**Goal**: Ship Minigraf as a drop-in native library for Android (Kotlin/Java) and iOS (Swift), with pre-built artifacts so mobile developers don't need to touch Rust.

Expand Down Expand Up @@ -1587,10 +1589,14 @@ Push `Expr` predicate clauses (e.g. `[(> ?age 30)]`) down to filter bindings as
- ≥90% branch coverage
- Stable API, stable file format, comprehensive tests, full documentation, performance validated

### v1.0.0 - 🎯 Phase 8 (Cross-platform)
- WASM support (browser + WASI) ✅ Phase 8.1 complete (v0.20.0)
- Mobile bindings (iOS + Android)
- Language bindings (Python, C, Node.js)
### v1.0.0 - ✅ Phase 8 Complete (Cross-platform)
- Browser WASM (`@minigraf/browser` npm, IndexedDB backend) ✅ v0.20.0
- WASI (`wasm32-wasip1`, Wasmtime/Wasmer CI) + `@minigraf/wasi` npm package ✅ v1.0.0
- Android `.aar` + iOS `.xcframework` (UniFFI) ✅ v0.21.0
- Python `minigraf` on PyPI ✅ v0.22.0
- Java/ 8 JVM `min 10BC8 igraf-jvm` on Maven Central ✅ v0.23.0
- C FFI `minigraf.h` + platform tarballs ✅ v0.24.0
- Node.js `minigraf` on npm ✅ v0.25.0

**Stability Promise**: After v1.0.0, we commit to:
- Backwards-compatible file format (decades)
Expand Down Expand Up @@ -1651,8 +1657,12 @@ When evaluating features, ask:
- ✅ Phase 7.8: Complete (April 2026) - Prepared statements (`$slot` bind tokens, temporal bind slots, plan reuse), 780 tests
- ✅ Phase 7.9: Complete (April 2026) - Publish prep (crates.io API cleanup, Rustdoc sweep, `unwrap` audit, CI matrix), 788 tests
- ✅ Phase 8.1: Complete (April 2026) - Browser WASM (`BrowserDb`, IndexedDB backend) + WASI (`wasm32-wasip1` CI) + cross-platform compat tests, 795 tests
- 🔄 Phase 8.2: In progress — Mobile bindings (Android `.aar` + iOS `.xcframework` via UniFFI 0.31.1), 815 tests
- 🔄 Phase 8: In progress (Cross-platform — WASM ✅, mobile, language bindings → **v1.0.0**)
- ✅ Phase 8.2: Complete (April 2026) — Mobile bindings (Android `.aar` + iOS `.xcframework` via UniFFI 0.31.1), 795 tests
- ✅ Phase 8.3a: Complete (April 2026) — Python `minigraf` on PyPI, 795 tests
- ✅ Phase 8.3b: Complete (April 2026) — Java/JVM `minigraf-jvm` on Maven Central, 795 tests
- ✅ Phase 8.3c: Complete (April 2026) — C FFI `minigraf.h` + platform tarballs, 795 tests
- ✅ Phase 8.3d: Complete (April 2026) — Node.js `minigraf` on npm, 795 tests
- ✅ Phase 8: Complete (May 2026) — v1.0.0
- 🎯 Phase 9: Ongoing (Ecosystem — integration examples, cookbook, GraphRAG/LangChain examples)

**Note**: This is a hobby project. Timeline is flexible but realistic.
Expand All @@ -1661,24 +1671,18 @@ When evaluating features, ask:

## Current Focus

**Right Now**: Phase 8.3 ✅ COMPLETE — Language Bindings

**Phase 8.2 Progress** ✅ COMPLETE:
1. ✅ Workspace conversion (`minigraf-ffi` crate added)
2. ✅ `MiniGrafDb` FFI API (open, open_in_memory, execute, checkpoint) via UniFFI 0.31.1
3. ✅ Android Gradle project (`.aar` assembly + GitHub Packages publishing)
4. ✅ Swift Package Manager manifest (`Package.swift`)
5. ✅ CI workflows: `mobile.yml` (Android/iOS), `wasm-release.yml` (WASM artifacts)
6. ✅ 815 tests passing (795 core + 20 FFI)
**Phase 8**: ✅ COMPLETE — v1.0.0 released (May 2026)

**Phase 8.3 Progress**:
- ✅ 8.3a: Python bindings via UniFFI — PyPI `minigraf` — v0.22.0 COMPLETE
- ✅ 8.3b: Desktop JVM bindings — fat JAR on Maven Central (`io.github.adityamukho:minigraf-jvm:0.23.0`) — v0.23.0 COMPLETE
- ✅ 8.3c: C bindings via `cbindgen` — GitHub Releases tarballs (`minigraf.h` + shared lib) — v0.24.0 COMPLETE
- ✅ 8.3d: Node.js bindings via `napi-rs` — npm `minigraf` — v0.25.0 COMPLETE
**All Phase 8 sub-phases complete**:
- ✅ 8.1a: Browser WASM (`@minigraf/browser` npm) — v0.20.0
- ✅ 8.1b: WASI (`wasm32-wasip1`) + `@minigraf/wasi` npm — v1.0.0
- ✅ 8.2: Mobile (Android `.aar` + iOS `.xcframework`) — v0.21.0
- ✅ 8.3a: Python (PyPI) — v0.22.0
- ✅ 8.3b: Java/JVM (Maven Central) — v0.23.0
- ✅ 8.3c: C FFI (GitHub Releases) — v0.24.0
- ✅ 8.3d: Node.js (npm) — v0.25.0

**Immediate Next Steps**:
- Phase 9: Ecosystem & Tooling
**Next**: Phase 9 — Ecosystem & Tooling (post-release optimisation and benchmarking first)

**Key Decisions Made**:
- ✅ Datalog query language (simpler, better for temporal)
Expand All @@ -1688,10 +1692,10 @@ When evaluating features, ask:
- ✅ UTC-only timestamps (avoids chrono GHSA-wcg3-cvx6-7396)
- ✅ Packed pages over one-per-page (philosophy: small binary, efficient storage)
- ✅ Approximate LRU (read-lock on hits — avoids write-lock contention)
- ✅ Phase 8 = v1.0.0 (not Phase 7 — cross-platform completion is the 1.0 milestone)
- ✅ Phase 8 = v1.0.0 (cross-platform completion is the 1.0 milestone)

See [GitHub Issues](https://github.com/project-minigraf/minigraf/issues) for specific tasks.

---

**Last Updated**: Phase 8.3d Complete (April 2026) — 795 tests passing, v0.25.0
**Last Updated**: Phase 8 Complete (May 2026) — 795 tests passing, v1.0.0
Loading
Loading
0