refactor: remove dead old-style c_bind files#20422
Merged
johnathan79717 merged 2 commits intomerge-train/barretenbergfrom Feb 12, 2026
Merged
refactor: remove dead old-style c_bind files#20422johnathan79717 merged 2 commits intomerge-train/barretenbergfrom
johnathan79717 merged 2 commits intomerge-train/barretenbergfrom
Conversation
All per-module c_bind files (extern "C" WASM_EXPORT functions) have been superseded by the unified bbapi msgpack entry point. TypeScript (bb.js), Rust (barretenberg-rs), and the native CLI exclusively use bbapi() - zero callers remain for the old individual exports. Removes 24 dead files (1,512 lines), reduces WASM binary by ~500KB (5%).
ledwards2225
approved these changes
Feb 12, 2026
Contributor
ledwards2225
left a comment
There was a problem hiding this comment.
This makes me so happy
aadb882 to
b7f57a0
Compare
Add INTERFACE library fallback in barretenberg_module_with_sources for modules that have dependencies but no source files (now header-only after c_bind removal). This fixes the fuzzing build where dependents couldn't find crypto_blake3s, crypto_ecdsa, and crypto_schnorr as link targets. Also removes the stale crypto/ecdsa/c_bind.h header.
1c89966 to
64181b8
Compare
12a9adb
into
merge-train/barretenberg
11 of 12 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
c_bind.hpp/c_bind.cppfiles that exported individualextern "C"WASM functions (the old binding architecture)bbapi()msgpack entry point by TypeScript (bb.js), Rust (barretenberg-rs), and the native CLICMakeLists.txt(crypto_blake3s_objects,crypto_ecdsa_objects,crypto_schnorr_objects)#includeof deleted headers from 2 test files and stalec_bind.hfrom ecdsamodule.cmakefor header-only modules (blake3s, ecdsa, schnorr are now header-only after c_bind removal)Binary size reduction
barretenberg.wasmbarretenberg.wasm.gzlibbarretenberg.aTest plan
cmake --preset clang20) succeedscmake --preset wasm) succeedscmake --preset fuzzing) — fixed link error for header-only modules