Skip to content

Commit dc8b6e2

Browse files
dfa1claude
andcommitted
docs: CLAUDE structure tree + hermetic/no-binary-blobs motivation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 30cc497 commit dc8b6e2

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,32 @@ The differentiator is **dictionary compression** — trained from your own data
77
ZDICT — plus a **zero-copy `MemorySegment` API** for callers whose bytes are
88
already off-heap (e.g. an mmap slice in, an arena buffer out).
99

10-
## Layout
10+
A core goal is a **hermetic build with no binary blobs**: the native library is
11+
never checked in or downloaded prebuilt. It is compiled from the pinned
12+
`third_party/zstd` source on every build via `zig cc`, which bundles its own
13+
clang + libc for every target. Anyone with the repo and Zig reproduces the exact
14+
`.dylib/.so/.dll` from source — no vendored binaries to trust, audit, or keep in
15+
sync, and no host toolchain or sysroot to provision.
1116

12-
Multi-module Maven build (`io.github.dfa1:zstd-java`):
17+
## Layout
1318

14-
- `zstd/` — the library module, artifactId `zstd-java`, pure-Java FFM bindings
15-
(package `io.github.dfa1.zstdffm`). The only module with Java sources.
16-
- `native/<classifier>/` — one module per platform; each packages a
17-
`libzstd.{dylib,so,dll}` built from the `third_party/zstd` submodule. No Java.
18-
Classifiers: `osx-aarch64`, `osx-x86_64`, `linux-x86_64`, `linux-aarch64`,
19+
Multi-module Maven build. Root aggregator artifactId is `parent`; the published
20+
library is `io.github.dfa1:zstd-java`.
21+
22+
```
23+
zstd-java/ root pom, artifactId: parent
24+
├─ zstd/ library module, artifactId: zstd-java (only Java sources)
25+
├─ native/<classifier>/ one module per platform, packages libzstd.<ext>
26+
├─ bom/ dependency BOM
27+
├─ third_party/zstd/ vendored facebook/zstd submodule (C source of truth)
28+
└─ scripts/build-zstd.sh zig cc build, invoked by each native module
29+
```
30+
31+
- `zstd/` — pure-Java FFM bindings, package `io.github.dfa1.zstdffm`.
32+
- `native/<classifier>/` — no Java; each builds + bundles the shared library for
33+
one classifier: `osx-aarch64`, `osx-x86_64`, `linux-x86_64`, `linux-aarch64`,
1934
`windows-x86_64`, `windows-aarch64`.
20-
- `bom/` — dependency BOM.
21-
- `third_party/zstd/` — vendored `facebook/zstd` git submodule (the C source of truth).
35+
- `third_party/zstd/` — pinned submodule; the only source of native code.
2236

2337
## Native build
2438

0 commit comments

Comments
 (0)