|
| 1 | +# lance-graph-java |
| 2 | + |
| 3 | +**Not Java bindings for a Rust graph library.** A migration path: an ordinary |
| 4 | +Java developer writes familiar, boring, fluent Java and gets zero-copy |
| 5 | +columnar/SIMD execution against `AdaWorldAPI/lance-graph`, without learning |
| 6 | +Rust, SoA layout, SIMD, FFM, or graph-engine internals. |
| 7 | + |
| 8 | +``` |
| 9 | + 64,000 logical "things being considered" |
| 10 | + do NOT require |
| 11 | + 64,000 Java objects. |
| 12 | +
|
| 13 | + They become: |
| 14 | + 1 native lane set |
| 15 | + + 1 packed mask |
| 16 | + + a handful of tiny typed semantic descriptors |
| 17 | + + one bulk operation |
| 18 | +``` |
| 19 | + |
| 20 | +## The architecture |
| 21 | + |
| 22 | +``` |
| 23 | + JAVA SEMANTIC PLANE |
| 24 | +
|
| 25 | + lance-graph-java API <- what a Java developer writes |
| 26 | + | |
| 27 | + typed semantic values <- generated-schema vocabulary |
| 28 | + | |
| 29 | + View / Mask / Lens DSL <- lazy, monotonic-narrowing |
| 30 | + | |
| 31 | + stable-JDK implementation |
| 32 | + | |
| 33 | + Valhalla laboratory <- the tiny vocabulary only |
| 34 | +
|
| 35 | +====================== PANAMA FFM ====================== |
| 36 | +
|
| 37 | + stable ABI membrane <- docs/abi.md, 14 symbols |
| 38 | +
|
| 39 | +====================== RUST DATA PLANE ====================== |
| 40 | +
|
| 41 | + lance-graph |
| 42 | + | |
| 43 | + ClassView / WideFieldMask |
| 44 | + | |
| 45 | + Lens / Mask algebra |
| 46 | + | |
| 47 | + ndarray |
| 48 | + | |
| 49 | + ndarray::simd::* <- the ONLY SIMD surface |
| 50 | + | |
| 51 | + AVX-512 / AVX2 / NEON / WASM SIMD / scalar |
| 52 | +``` |
| 53 | + |
| 54 | +There is **no C anywhere** in this stack — `extern "C"` names the platform |
| 55 | +calling convention (SysV AMD64 psABI here), not the C language. No headers, |
| 56 | +no `cbindgen`, no `jextract`, no JNI. See `docs/abi.md` §1 and |
| 57 | +`.claude/knowledge/no-c-ever.md`. |
| 58 | + |
| 59 | +## Layout |
| 60 | + |
| 61 | +| Path | What | |
| 62 | +|---|---| |
| 63 | +| `docs/abi.md` | The normative Rust↔Java ABI contract. Read this first. | |
| 64 | +| `native/lgj-abi/` | Rust: the ABI crate. Depends on `ndarray` (path sibling) for all SIMD, via `ndarray::simd::*` only — never `ndarray::hpc` directly. | |
| 65 | +| `java/` | Java: the FFM membrane (`internal/ffm`, Panama machinery) + the public semantic facade (`View`/`Mask`/`Predicate`/`Pattern`). | |
| 66 | +| `valhalla-lab/` | The three-truths method applied to the small semantic value vocabulary (`LaneId`/`RowRange`/...), on a real JEP 401 early-access JDK. | |
| 67 | +| `bench/` | Cost-component-separated benchmarks: Panama downcall overhead, `MemorySegment` throughput, the Rust kernel, Java Vector API over the same native memory, fused vs unfused plan cost. | |
| 68 | +| `.claude/` | Agent ensemble + knowledge docs + project board, scoped to this repo's actual seams. Start at `.claude/agents/BOOT.md`. | |
| 69 | + |
| 70 | +## Toolchains |
| 71 | + |
| 72 | +- Rust: **1.97.1** stable, matching `ndarray`/`lance-graph`'s pin. |
| 73 | +- Production JDK: a GA build with `java.lang.foreign` final (no preview |
| 74 | + flag needed) — verified against JDK 26 GA. |
| 75 | +- Valhalla lab JDK: the official JEP 401 early-access binary from |
| 76 | + `jdk.java.net/valhalla/` — a value-classes preview build, kept physically |
| 77 | + separate from the production path. |
| 78 | + |
| 79 | +See `.claude/knowledge/jdk-toolchain-facts.md` for exact verified paths and |
| 80 | +flags in the reference development environment. |
| 81 | + |
| 82 | +## Status |
| 83 | + |
| 84 | +Early research vertical slice. See `.claude/board/STATUS_BOARD.md` for |
| 85 | +current per-deliverable status and `.claude/board/LATEST_STATE.md` for the |
| 86 | +current contract inventory. |
0 commit comments