Skip to content

Commit 0b1843f

Browse files
dfa1claude
andcommitted
docs: link explanation.md to the ADRs
Cross-reference ADR 0001 (FFM over JNI) and ADR 0002 (zig cc) inline in the Why FFM and Zig section, and add an Architecture decisions section pointing at the ADR index. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7cdbd70 commit 0b1843f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/explanation.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
The bindings use the **Foreign Function & Memory API** rather than JNI: no
66
hand-written C glue, no separate native compile step for the binding layer, and a
77
direct path from Java to zstd's addresses — which is what makes the zero-copy
8-
`MemorySegment` API possible.
8+
`MemorySegment` API possible. See
9+
[ADR 0001 — FFM over JNI](../adr/0001-ffm-over-jni.md).
910

1011
The native library itself is built from vendored zstd source via **`zig cc`** as
1112
a drop-in C compiler. zstd is pure C with no build-system dependencies, so the
1213
sources are compiled directly — no autotools, no CMake. Zig bundles clang and
1314
libc for every target, enabling hermetic cross-compilation without a sysroot:
14-
any host can build all six platform artifacts.
15+
any host can build all six platform artifacts. See
16+
[ADR 0002 — zig cc native build](../adr/0002-zig-cc-native-build.md).
1517

1618
## When zero-copy pays off
1719

@@ -23,3 +25,9 @@ does not matter, is in [zero-copy.md](zero-copy.md).
2325

2426
Throughput and allocation versus zstd-jni (JNI) and aircompressor (pure Java),
2527
including an async-profiler breakdown: [benchmarks.md](benchmarks.md).
28+
29+
## Architecture decisions
30+
31+
The reasoning above is distilled from the full set of Architecture Decision
32+
Records — every foundational choice, its alternatives, and its trade-offs, one
33+
file per decision: [adr/ADR.md](../adr/ADR.md).

0 commit comments

Comments
 (0)