Skip to content

Commit 4ab4ea9

Browse files
hyperpolymathclaude
andcommitted
docs(chapel-ffi): document self-linking build + ignore regenerable outputs
Follow-up to 53ab9b8 — human/machine parity. - QUICKSTART-DEV.adoc: new section describing the zig build -Dstubs=true default and the cargo build --features chapel two-step; plus the -Dstubs=false path for linking against real libechidna_chapel. - chapel_poc/README.md: mark "Add FFI bindings to call from Rust" as DONE, pointing to the Chapel → Zig → Rust chain that's now wired. - .gitignore: add models/e*/, /models_e*/ (per-epoch training checkpoints, regenerable) and src/zig_ffi/zig-out/, .zig-cache/ (regenerated by `zig build`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 53ab9b8 commit 4ab4ea9

3 files changed

Lines changed: 38 additions & 1 deletion

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ FINAL_CORPUS_COMPLETENESS_REPORT.md
166166
PROVER_EXPANSION_ROADMAP.md
167167
models/neural/
168168

169+
# Per-epoch training checkpoints (regenerated; only models/ root kept)
170+
models/e*/
171+
/models_e*/
172+
173+
# Zig FFI build output (regenerated by `zig build`)
174+
src/zig_ffi/zig-out/
175+
src/zig_ffi/.zig-cache/
176+
169177
# asdf version manager
170178
.tool-versions
171179

QUICKSTART-DEV.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ just tour # understand the codebase
2727
just help-me # see available commands
2828
----
2929

30+
== Optional: Chapel Parallel Proof Search
31+
32+
The Rust core exposes an optional parallel-search path that calls into
33+
Chapel via a Zig FFI bridge. It is feature-gated and off by default.
34+
35+
[source,bash]
36+
----
37+
cd src/zig_ffi && zig build # builds libechidna_chapel_ffi.{a,so}
38+
# default -Dstubs=true bundles chapel_stubs.c
39+
# so Rust links cleanly without Chapel
40+
cd ../..
41+
cargo build --features chapel
42+
cargo test --features chapel --lib proof_search
43+
----
44+
45+
With Chapel actually installed and `libechidna_chapel.so` built from
46+
`chapel_poc/`, pass `-Dstubs=false` to the Zig build and link the
47+
Chapel library alongside. Stubs return "Chapel unavailable" at runtime
48+
so `cargo test --features chapel` still passes on hosts without Chapel.
49+
3050
== Before Committing
3151

3252
[source,bash]

chapel_poc/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,16 @@ Speedup: 1.51x
103103

104104
## Next Steps
105105

106-
1. **Integration**: Add FFI bindings to call from Rust
106+
1. ~~**Integration**: Add FFI bindings to call from Rust~~**DONE**.
107+
Chapel `export` functions in `chapel_ffi_exports.chpl` are wrapped by
108+
the Zig bridge at `../src/zig_ffi/chapel_bridge.zig`, which in turn
109+
exports the `echidna_*` C ABI consumed by
110+
`../src/rust/proof_search.rs` under `#[cfg(feature = "chapel")]`.
111+
Build the Zig bridge with `cd ../src/zig_ffi && zig build` (default
112+
`-Dstubs=true` bundles `chapel_stubs.c` so Rust links without a
113+
Chapel install); then `cargo build --features chapel` from the repo
114+
root. Pass `-Dstubs=false` to the Zig build to link against the real
115+
`libechidna_chapel.so` produced in this directory.
107116
2. **Real Provers**: Replace mock with actual prover backends
108117
3. **Distributed**: Run on multi-node cluster
109118
4. **ML Integration**: Parallel model training

0 commit comments

Comments
 (0)