Remove the .zig porting-reference sources - #32621
Conversation
|
Updated 8:02 PM PT - Jun 24th, 2026
✅ @robobun, your commit 46fff1c914a350559ecb64d1c4bbb1d6dc7e98cf passed in 🧪 To try this PR locally: bunx bun-pr 32621That installs a local version of the PR into your bun-32621 --bun |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRemoves the ChangesRemove .zig References from Build Tooling and Docs
Possibly related issues
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
The Rust port is the only compiled implementation; the 1,270 .zig files
under src/ have been kept alongside their .rs replacements purely as a
behavioral reference and are not built (build.zig is gone, no Cargo
build.rs or include_str! reads them). Drop them.
Collateral fixes so nothing points at the deleted files:
- bake-codegen.ts: extract IncomingMessageId/MessageId from
dev_server/mod.rs instead of DevServer.zig (PascalCase variants are
snake_cased so generated.ts is unchanged for the HMR client). Fail
loudly if an enum is missing or empty.
- glob-sources.ts: drop the unused 'zig' glob entry.
- test/internal/ban-words.test.ts + ban-limits.json: deleted — the
banned-words counts and the per-matcher incrementExpectCallCounter
check were both defined over .zig sources that no longer exist.
- zstd.test.ts: use parser.rs as the large compression payload.
- glob/stress.test.ts: scan src/**/*.rs instead of *.zig.
- CLAUDE.md, src/CLAUDE.md, scripts/build/CLAUDE.md,
scripts/build/codegen.ts: drop prose that described the .zig siblings
or the removed sources.zig glob.
Not touched here (follow-ups):
- src/css/build-prefixes.js still emits targets.zig/prefixes.zig/compat.zig
and shells out to 'zig fmt'. The .rs outputs already exist and claim a
'--rs' mode that the script does not implement; the script needs porting
before the next caniuse refresh.
- scripts/build/codegen.ts still generates a handful of .zig outputs into
codegenDir / src/jsc/bindings (gitignored) that nothing consumes.
- A Rust equivalent of the per-matcher incrementExpectCallCounter check.
71b23f4 to
495c6a7
Compare
The \$zig() / \$newZigFunction() macro and bindgen both used the .zig
sibling path purely as an identifier (comment text, map key, dedup key)
and never opened the file; the existsSync was a sanity guard from when
the .zig sources were the implementation. With the .zig reference files
removed:
- generate-js2native.ts: stop scanning src/ for .zig; for the "zig"
call type return the filename identifier directly instead of
resolving it against the (now empty) source list. NativeFilenameZig
becomes string.
- bindgen.ts: drop the per-.bind.ts existsSync of the .zig sibling.
Verified bindgen.ts and registerNativeCall("zig", "ffi.zig", ...) both
run to completion locally.
Both invoked test/internal/ban-words.test.ts, which is gone.
…README section
bunshell's broken-pipe-subproc test grepped src/js_parser/parser.zig
from cwd; with that file gone grep writes ENOENT to stderr and the
.stderr('') assertion fails. parser.rs is the same large file
zstd.test.ts now uses.
|
@robobun get this mergable |
|
All follow-ups and every review finding through 46fff1c addressed across 50+ iterations, including the three findings on Jarred's 962393f ( Every |
resolveNativeFileId() for $zig() now returns the absolute path each identifier resolved to before the .zig sources were removed, via a 50-entry lookup table. rustTarget() and normalizeSymbolPathPrefix() both depend on the directory component, so returning the bare macro argument (24e728b1) caused every thunk in generated_js2native.rs to reference a nonexistent crate::dispatch::js2native::* item and changed the exported JS2Zig__* symbol names. Verified generated_js2native.rs and GeneratedJS2Native.h are byte-identical to what the previous directory scan produced. Also drops two .claude/ doc references to the deleted .zig files.
- Delete scripts/longest.js: hard-rejects non-.zig input, parses Zig declaration syntax; now unconditionally dead with no callers. - Delete scripts/cleartrace.ts + cleartrace-impl.js: filters Zig compiler output (logger.zig, @CompileError, vendor/zig/lib/std) that cannot appear now that "bun run watch" runs cargo. - scripts/build/deps/{zstd,libarchive}.ts: repoint rationale comments at the .rs files that replaced the cited .zig sources. - generate-js2native.ts: restore the NativeFilenameZig literal union from Object.keys(zigIdentifierPaths) so $zig()/$newZigFunction() keep IDE autocomplete and edit-time typo checking.
bake-codegen.ts now reads src/runtime/bake/dev_server/mod.rs to derive
the MessageId/IncomingMessageId const-enums for the HMR client, but the
ninja edge only declared *.{ts,css} inputs. Editing a wire-protocol
discriminant in mod.rs would rebuild the server (via sources.rust)
without regenerating generated.ts/bake.client.js, leaving the client
with stale inlined opcodes on incremental builds.
Also drop the "css-properties" package.json script: it points at
src/css/properties/generate_properties.ts which writes
properties_generated.zig and runs vendor/zig/zig.exe fmt, neither of
which can succeed now. Same class as build-prefixes.js (follow-up).
Dead files this PR orphans:
- src/clap/{zig.mod,gyro.zzz}: zigmod/gyro package manifests whose
every declared source (clap.zig, clap/*.zig) is deleted here.
- misctools/lldb/lldb_pretty_printers.py + init.lldb wiring: vendored
ziglang/zig lldb formatters for Zig-language debug info the binary
no longer contains.
- misctools/gdb/zig_gdb_pretty_printers.py + .vscode/launch.json
source line: same, for gdb/rr.
- .vscode/settings.json: drop the "// Zig" block pointing at
nonexistent vendor/zig/ and a [zig] formatter for zero files.
Internal docs: repoint .zig filenames at their .rs replacements in
src/bundler/linker_context/README.md, src/event_loop/README.md,
src/runtime/image/README.md, src/jsc/STREAMS.md, src/js/{CLAUDE,README}.md,
and src/jsc/bindings/v8/{CLAUDE,AGENTS}.md (napi.zig -> napi_body.rs).
Every rewritten path verified to exist on disk.
|
@robobun please fix all the follow-ups and then update the PR body. All of the follow-ups belong in this PR. |
|
All seven workstreams below complete as of a23032c. PR body updated to match. 1. Dead 2. Manual codegen scripts → Rust output (done):
3. 4. 5. 6. 7. Source-comment references (done): repointed ~20 |
Dead .zig codegen emitters (nothing consumes these outputs):
- bundle-modules.ts / generate-js2native.ts: drop getJS2NativeZig.
- bindgen.ts: stop writing GeneratedBindings.zig.
- bindgenv2/script.ts: stop listing/writing bindgen_generated.zig.
- generate-classes.ts: drop ZigGeneratedClasses.zig write and header.
- generate-node-errors.ts: drop ErrorCode.zig accumulation and write.
- cppbind.ts: drop cpp.zig write.
- scripts/build/codegen.ts: drop all .zig declared outputs,
zigFilesGeneratedIntoSrc, bindgenV2Zig, emitCiInfo (ci_info.ts
deleted; Rust uses hand-maintained ci_info_generated).
- .gitignore: drop the matching entries.
Manual codegen scripts:
- generate_properties.ts: deleted; properties_generated.rs header
already said "hand-maintained, does not write this file".
- color_via.ts: deleted; the committed color_generated.rs routes
through different intermediates than the script would produce, so
the .rs is the source of truth. Header updated.
- build-prefixes.js: emission rewritten to produce prefixes.rs /
compat.rs / the Features bitflags block in targets.rs, with
rustfmt instead of zig fmt. allBrowsers (previously undefined)
added. The committed .rs files are unchanged; the script is ready
for the next caniuse refresh.
- generate-add-completions.ts: ported to emit add_completions.rs
(FirstLetter enum, zstd-compressed blob, per-letter INDEX,
Once<Table> init/get_packages). Regenerated from
add_completions.txt; bun add completions now populated again.
generate-perf-trace-events.sh: rewritten to scan .rs for both
bun_core::perf::trace("...") and bun_perf::trace(PerfEvent::X),
emit generated_perf_trace_events.h and the PerfEvent enum in
generated_perf_trace_events.rs, and fail loudly on zero matches.
docs/project/bindgen.mdx: rewritten against the Rust workflow using
bindgen_test.rs / fmt_jsc.rs as the worked examples.
test/internal/expect-call-counter.test.ts: reinstates the
increment_expect_call_counter coverage check over
src/runtime/test_runner/expect/*.rs, accepting the shared helpers
(matcher_prelude, unary_predicate_matcher!, etc.) that call it.
.claude/: delete skills/implementing-jsc-classes-zig and
skills/zig-system-calls (workflows that cannot be followed); delete
hooks/post-edit-zig-format.js and its settings wiring; point the GC
skill at src/jsc/JSRef.rs.
Comment/config references: repoint .zig paths in bun-uws/bun-usockets
headers, StringBuilderBinding.cpp, TopExceptionScopeBinding.cpp,
PipeWriter.rs, StandaloneModuleGraph.rs, yaml.rs,
comptime_string_map.rs, bundler/Cargo.toml, windows-shim/Cargo.toml,
install.ps1, rust.ts; drop *.zig / .zig-cache from .gitattributes and
.dockerignore.
bun bd links cleanly.
The Zig sources were removed in #32621 and the Rust port is the only implementation, but the README, the docs site, the VS Code extension README, and the Bun.password JSDoc in bun-types still said Bun is written in Zig. Update those claims, fix the LICENSE relink instructions (which told people to run `make jsc` and `zig build`), and remove a few developer-facing leftovers: the dead zig problemMatcher in .vscode/tasks.json, a stale .zig path, and a comment describing a Zig build flag that no longer exists. Fixes #31233
Fixes #31233 ### What does this PR do? #32621 removed the Zig sources; the Rust port is the only implementation. The README, the docs site, and a couple of published packages still describe Bun as written in Zig (#31233 reports the README one). This updates them. Nothing in this PR reaches the compiler: it is markdown, mdx, JSDoc, editor config, and a build-script comment. **User-facing** - `README.md`, `docs/index.mdx`, `packages/bun-vscode/README.md`: "It's written in Zig and powered by JavaScriptCore" now says Rust. - `docs/runtime/index.mdx`, `docs/bundler/esbuild.mdx`, `docs/runtime/{shell,redis,json5,yaml,markdown}.mdx`: "written in Zig" and "Zig-based" claims, each checked against the actual implementation (`src/runtime/shell/`, `src/runtime/valkey_jsc/`, `src/parsers/{json5,yaml}.rs`, `src/md/`). - `docs/bundler/css.mdx`: the CSS bundler was described as "a direct Rust → Zig port of LightningCSS", now "a direct port of LightningCSS". - `docs/bundler/html-static.mdx`: "58,000 lines of Zig" becomes "70,000 lines of Rust" (`src/css/**/*.rs` is 71.7k lines today). - `docs/runtime/utils.mdx`: the `Bun.stringWidth` SIMD implementation lives in `src/jsc/bindings/stringWidth.cpp`, so this one says "native code" rather than claiming Rust. - `docs/runtime/ffi.mdx`: the C++ example was compiled with `zig build-lib add.cpp`; it now shows `clang++` for Linux and macOS. The Zig FFI example itself stays, since calling a Zig shared library through `bun:ffi` is unrelated to Bun's implementation language. - `packages/bun-types/bun.d.ts`: the `Bun.password` JSDoc credited the Zig standard library. The implementation routes to the `rust-argon2` and `bcrypt` crates (`src/runtime/crypto/pwhash.rs`), so it now says that. - `LICENSE.md` and `docs/project/license.mdx` still told people to relink WebKit with `git submodule update`, `make jsc`, and `zig build`, none of which exist anymore. The steps now match `docs/project/contributing.mdx`: clone the WebKit fork into `vendor/WebKit`, check out `WEBKIT_VERSION`, run `bun run build:local`. The esbuild credit is now "a port of esbuild". **Developer-facing** - `.vscode/tasks.json`: the "Build Bun" task had a zig-owner problemMatcher for `file:line:col: error:` output. There is no Zig compiler in the build, and the clang matcher next to it handles the same single-line format, so the dead matcher is removed. - `misctools/lldb/README.md`, `scripts/build/deps/nodejs-headers.ts`, `test/js/web/fetch/H2_TEST_PORT_PLAN.md`: internal docs that described `ZigString` as "the Zig string type", a Zig build flag that no longer exists, and a deleted `.zig` path. **Intentionally not changed** - Identifiers that still exist in the code (`Zig::GlobalObject`, `ZigString`, `$ZigGeneratedClasses`, `zig_mutex_t`). #31822 is the rename pass for those. - Comments inside compiled sources (the `src/codegen/*.ts` "written in Zig" docblocks, the `packages/bun-usockets` header, a few `src/js` notes). Those are code changes, not docs, and they fit better with the identifier rename than with this prose pass. - The `bun:ffi` docs listing Zig among the C ABI languages, and the Zig FFI example. - Comments that are deliberately historical: Cargo.toml rationale notes, `bench/snippets/escapeHTML.mjs`, tests that explain a Zig-era bug. - External links into other projects' `.zig` files, such as the Tigerbeetle row in the license table. - `process.versions.zig` is still exposed at runtime with a pinned historical hash (`BunProcess.cpp` and `scripts/build/depVersionsHeader.ts`). Removing a `process.versions` key is a behavior change, not a docs fix, so it is left for a separate decision. ### How did you verify your code works? - This PR changes prose only; no compiled source is touched, so there is no runtime behavior to regression-test. - Every "written in Rust" claim was checked against the implementation it describes before editing (paths above). - `bun test test/integration/bun-types/bun-types.test.ts` passes with the `bun.d.ts` edit. - The docs preview deployment renders the changed pages.
The .zig porting-reference sources were removed on main (#32621), so $newZigFunction("event_loop.zig", ...) no longer resolves. Switch to $newRustFunction("event_loop.rs", ...); the dispatch re-export and the js_event_loop_utilization host fn are already in place.
The .zig porting-reference sources were removed on main (#32621), so $newZigFunction("event_loop.zig", ...) no longer resolves. Switch to $newRustFunction("event_loop.rs", ...); the dispatch re-export and the js_event_loop_utilization host fn are already in place.
…35327) ### What does this PR do? The registry/token env-var scan loops in `Options::load` (`src/install/PackageManager/PackageManagerOptions.rs`) carried a `did_set` flag with an `if !did_set` guard in place of `break`. This was a workaround for a Zig stage1 compiler bug where `break` inside `inline for` was broken, ported verbatim into the Rust rewrite along with its explanatory comment: ```rust self.scope.token = registry_.into(); did_set = true; // stage1 bug: break inside inline is broken // break :load_registry; ``` The Zig sources were removed in #32621 and the stage1 compiler no longer exists. In Rust this is just a plain `for` loop, so use `break` directly and drop: - the `did_set` flag and `if !did_set` wrapper (both loops) - the dead `// break :load_registry;` Zig-syntax comment - the `// load_registry:` label comment - the two `// was \`inline for\`; homogeneous elements -> plain for.` porting notes ### Behavior **No observable change.** The `if !did_set` guard already ensured the first matching env var wins; this PR just expresses that with `break`. Verified empirically against the released binary: ``` BUN_CONFIG_TOKEN=a NPM_CONFIG_TOKEN=b npm_config_token=c bun install -> Authorization: Bearer a ``` ### Tests Added to `test/cli/install/bun-install-registry.test.ts` to lock in the priority order (previously untested): - `BUN_CONFIG_TOKEN` wins over `NPM_CONFIG_TOKEN` and `npm_config_token` - empty `BUN_CONFIG_TOKEN` falls through to `NPM_CONFIG_TOKEN` - `BUN_CONFIG_REGISTRY` wins over `NPM_CONFIG_REGISTRY` / `npm_config_registry` These pass on the released binary as well; they exist to pin the refactor and guard against future changes to the key ordering. Related: #34170 touches the same block for a different concern (bunfig vs. env-var precedence); whichever lands second will need a small rebase. <!-- robobun:evidence:begin --> --- **no test proof** · iteration 0 · Platform-specific test(s) that do not run on this machine. Deferring to CI, which covers all platforms: test/cli/install/bun-install-registry.test.ts <!-- robobun:evidence:end --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Re-ports the fix onto the Rust Request/fetch (the Zig sources were removed in #32621). Same behavior as the original PR: - Add `integrity`/`referrer` OwnedStringCell fields and a `keepalive` bit in Flags (widened 4→5 bytes; assert_ffi_layout updated). Parse them in construct_into, copy in clone_into and the Request-merge path, deref in finalize_without_deinit, count in memory_cost and calculate_estimated_byte_size. - getReferrer returns the spec tri-state ("about:client" default, "" for the no-referrer sentinel, else the serialized URL); getIntegrity returns the stored value; new getKeepalive wired via response.classes.ts. - Fetch spec step 12: a non-empty init resets referrer to "client" before init.referrer is read. Detected via an up-front WebIDL member-presence probe (matches undici's RequestInit key set), gated to the base iteration by loop index (handles aliased `new Request( req, req)`), and re-applied in the generic block so Request subclasses / structure-mutated bases (which bypass as_direct) don't leak the base referrer. - fetch.rs: skip Request objects (via `.as_`, subclass-aware) in the keepalive option extractor so the new spec accessor (default false) doesn't disable HTTP connection pooling. Tests ported unchanged: 20 in request.test.ts, 3 parameterized pooling cases in fetch-args.test.ts. All pass; referrer matrix matches Node 24.
The .zig porting-reference sources were removed in #32621, so the comment's reference to Zig's `?[]const u8` semantics and the camelCase function name no longer resolve in the tree. Use the real snake_case Rust function name and language-agnostic phrasing matching the source comment.
Re-ports the fix onto the Rust Request/fetch (the Zig sources were removed in #32621). Same behavior as the original PR: - Add `integrity`/`referrer` OwnedStringCell fields and a `keepalive` bit in Flags (widened 4→5 bytes; assert_ffi_layout updated). Parse them in construct_into, copy in clone_into and the Request-merge path, deref in finalize_without_deinit, count in memory_cost and calculate_estimated_byte_size. - getReferrer returns the spec tri-state ("about:client" default, "" for the no-referrer sentinel, else the serialized URL); getIntegrity returns the stored value; new getKeepalive wired via response.classes.ts. - Fetch spec step 12: a non-empty init resets referrer to "client" before init.referrer is read. Detected via an up-front WebIDL member-presence probe (matches undici's RequestInit key set), gated to the base iteration by loop index (handles aliased `new Request( req, req)`), and re-applied in the generic block so Request subclasses / structure-mutated bases (which bypass as_direct) don't leak the base referrer. - fetch.rs: skip Request objects (via `.as_`, subclass-aware) in the keepalive option extractor so the new spec accessor (default false) doesn't disable HTTP connection pooling. Tests ported unchanged: 20 in request.test.ts, 3 parameterized pooling cases in fetch-args.test.ts. All pass; referrer matrix matches Node 24.
Re-ports the fix onto the Rust Request/fetch (the Zig sources were removed in #32621). Same behavior as the original PR: - Add `integrity`/`referrer` OwnedStringCell fields and a `keepalive` bit in Flags (widened 4→5 bytes; assert_ffi_layout updated). Parse them in construct_into, copy in clone_into and the Request-merge path, deref in finalize_without_deinit, count in memory_cost and calculate_estimated_byte_size. - getReferrer returns the spec tri-state ("about:client" default, "" for the no-referrer sentinel, else the serialized URL); getIntegrity returns the stored value; new getKeepalive wired via response.classes.ts. - Fetch spec step 12: a non-empty init resets referrer to "client" before init.referrer is read. Detected via an up-front WebIDL member-presence probe (matches undici's RequestInit key set), gated to the base iteration by loop index (handles aliased `new Request( req, req)`), and re-applied in the generic block so Request subclasses / structure-mutated bases (which bypass as_direct) don't leak the base referrer. - fetch.rs: skip Request objects (via `.as_`, subclass-aware) in the keepalive option extractor so the new spec accessor (default false) doesn't disable HTTP connection pooling. Tests ported unchanged: 20 in request.test.ts, 3 parameterized pooling cases in fetch-args.test.ts. All pass; referrer matrix matches Node 24.
Re-ports the fix onto the Rust Request/fetch (the Zig sources were removed in #32621). Same behavior as the original PR: - Add `integrity`/`referrer` OwnedStringCell fields and a `keepalive` bit in Flags (widened 4→5 bytes; assert_ffi_layout updated). Parse them in construct_into, copy in clone_into and the Request-merge path, deref in finalize_without_deinit, count in memory_cost and calculate_estimated_byte_size. - getReferrer returns the spec tri-state ("about:client" default, "" for the no-referrer sentinel, else the serialized URL); getIntegrity returns the stored value; new getKeepalive wired via response.classes.ts. - Fetch spec step 12: a non-empty init resets referrer to "client" before init.referrer is read. Detected via an up-front WebIDL member-presence probe (matches undici's RequestInit key set), gated to the base iteration by loop index (handles aliased `new Request( req, req)`), and re-applied in the generic block so Request subclasses / structure-mutated bases (which bypass as_direct) don't leak the base referrer. - fetch.rs: skip Request objects (via `.as_`, subclass-aware) in the keepalive option extractor so the new spec accessor (default false) doesn't disable HTTP connection pooling. Tests ported unchanged: 20 in request.test.ts, 3 parameterized pooling cases in fetch-args.test.ts. All pass; referrer matrix matches Node 24.
Re-ports the fix onto the Rust Request/fetch (the Zig sources were removed in #32621). Same behavior as the original PR: - Add `integrity`/`referrer` OwnedStringCell fields and a `keepalive` bit in Flags (widened 4→5 bytes; assert_ffi_layout updated). Parse them in construct_into, copy in clone_into and the Request-merge path, deref in finalize_without_deinit, count in memory_cost and calculate_estimated_byte_size. - getReferrer returns the spec tri-state ("about:client" default, "" for the no-referrer sentinel, else the serialized URL); getIntegrity returns the stored value; new getKeepalive wired via response.classes.ts. - Fetch spec step 12: a non-empty init resets referrer to "client" before init.referrer is read. Detected via an up-front WebIDL member-presence probe (matches undici's RequestInit key set), gated to the base iteration by loop index (handles aliased `new Request( req, req)`), and re-applied in the generic block so Request subclasses / structure-mutated bases (which bypass as_direct) don't leak the base referrer. - fetch.rs: skip Request objects (via `.as_`, subclass-aware) in the keepalive option extractor so the new spec accessor (default false) doesn't disable HTTP connection pooling. Tests ported unchanged: 20 in request.test.ts, 3 parameterized pooling cases in fetch-args.test.ts. All pass; referrer matrix matches Node 24.
The Rust port is the only compiled implementation; the 1,270
.zigfiles undersrc/have been kept alongside their.rsreplacements purely as a behavioral reference and are not built (build.zigis gone, no Cargobuild.rsorinclude_str!reads them). Drop them: 666k lines.Codegen
generate-js2native.ts/replacements.ts/private.d.ts: the builtin-JS macros are renamed$zig()/$newZigFunction()->$rust()/$newRustFunction()across everysrc/js/call site, the exported C symbol prefixJS2Zig__*->JS2Rust__*, and the emitted.d.tsunionNativeFilenameZig->NativeFilenameRust.resolveNativeFileId()for$rust()looks up a static 50-entry.rs-keyedrustIdentifierPathstable instead of scanning the filesystem; the resolved path is never opened but drives both the exported symbol name and thecrate::...target ingenerated_js2native.rs. Unknown identifiers still fail codegen with a clear error. The two hand-exporteddns.rssymbols are updated to the new prefix. The deadgetJS2NativeZig()emitter is dropped..zigoutput from codegen:bindgen.ts(GeneratedBindings.zig),bindgenv2/script.ts(bindgen_generated.zig+ per-type),generate-classes.ts(ZigGeneratedClasses.zig),generate-node-errors.ts(ErrorCode.zig),cppbind.ts(cpp.zig), andbundle-modules.ts(GeneratedJS2Native.zig) all stop emitting their.zigoutputs. Each already has an.rs/.cpp/.hsibling in the same ninja edge, so cargo/cxx dependency ordering is preserved.scripts/build/codegen.tsdrops the matching declared outputs,zigFilesGeneratedIntoSrc,bindgenV2Zig, andemitCiInfo(whose only output wasci_info.zig; Rust uses the hand-maintainedci_info_generatedmodule inruntime/cli/mod.rs)..gitignoredrops the two in-src/generated.zigentries.bindgen.ts: drop the on-disk existence check for each*.bind.tsfile's.zigsibling; the path is only used as a map key.bake-codegen.ts: extractIncomingMessageId/MessageIdfromdev_server/mod.rsinstead ofDevServer.zig. PascalCase variants are snake_cased sogenerated.tsis byte-identical for the HMR client.glob-sources.ts: drop the unusedzigglob entry. Addsrc/runtime/bake/dev_server/mod.rstobakeRuntime.pathsso editing aMessageIddiscriminant re-runs bake-codegen on incremental builds.Manual codegen scripts
src/css/properties/generate_properties.ts: deleted;properties_generated.rsis hand-maintained (its header already said so). Thecss-propertiespackage.json entry is dropped.src/css/values/color_via.ts: deleted; the committedcolor_generated.rsroutes conversions through different intermediates than the script would produce, so the.rsis the source of truth. Header updated to "hand-maintained".src/css/build-prefixes.js: emission rewritten to produceprefixes.rs/compat.rs/ theFeaturesbitflags!block intargets.rs, withrustfmtinstead ofzig fmt.allBrowsers(previously referenced but never defined) added. The committed.rsfiles are unchanged; the script is ready for the next caniuse refresh.misctools/generate-add-completions.ts: ported to emitsrc/runtime/cli/add_completions.rs(FirstLetterenum, zstd-compressed blob viaBun.zstdCompressSync, per-letterINDEXtable,Once<Table>-backedinit/get_packages). Regenerated fromadd_completions.txt, sobun addcompletions are populated again instead of returning&[].scripts/generate-perf-trace-events.sh: rewritten to scan.rsfor both call shapes (bun_core::perf::trace("...")andbun_perf::trace(PerfEvent::X)), emitgenerated_perf_trace_events.hand thePerfEventenum ingenerated_perf_trace_events.rs, and fail on zero matches.Tests
test/internal/expect-call-counter.test.ts: reinstates theincrementExpectCallCountercoverage check oversrc/runtime/test_runner/expect/*.rs, accepting the shared helpers (matcher_prelude,unary_predicate_matcher!,run_string_affix_matcher,contain_matcher,numeric_ordering_matcher,mock_prologue) that call it internally. All 75 matchers satisfy it.test/internal/ban-words.test.ts+ban-limits.json: deleted; the banned-words counts and the original per-matcher check were both defined over.zigsources that no longer exist.zstd.test.ts: useparser.rs(~85 KB) as the large compression payload instead of the deletedparser.zig.glob/stress.test.ts: scansrc/**/*.rsinstead of*.zig.Docs
docs/project/bindgen.mdx: rewritten against the Rust workflow usingbindgen_test.rs/fmt_jsc.rsas the worked examples (that file already says "this example should be kept in sync with bindgen's documentation").CLAUDE.md,src/CLAUDE.md,scripts/build/CLAUDE.md,.claude/commands/upgrade-webkit.md,.claude/docs/landing-prs.md,scripts/build/codegen.ts: drop prose that described the.zigsiblings or the removedsources.zigglob.src/bundler/linker_context/README.md,src/event_loop/README.md,src/runtime/image/README.md,src/jsc/STREAMS.md,src/js/{CLAUDE,README}.md,src/jsc/bindings/v8/{CLAUDE,AGENTS}.md): repoint.zigfilename references at their.rsreplacements.Dead tooling and config
scripts/longest.js,scripts/cleartrace{.ts,-impl.js}: deleted;longest.jshard-rejected non-.ziginput and parsed Zig declaration syntax,cleartracefiltered Zig compiler output that cannot appear now thatbun run watchrunscargo watch.src/codegen/ci_info.ts: deleted; emitted only Zig.src/clap/{zig.mod,gyro.zzz}: deleted; zigmod/gyro package manifests whose every declared source is removed here.misctools/lldb/lldb_pretty_printers.py,misctools/gdb/zig_gdb_pretty_printers.py: deleted along with theirinit.lldb/.vscode/launch.jsonwiring; vendored Zig-language debug formatters that match nothing in a Rust binary..claude/skills/{implementing-jsc-classes-zig,zig-system-calls}/: replaced by Rust equivalentsimplementing-jsc-classes-rustandrust-system-calls(a-cppsibling already exists for the former)..claude/hooks/post-edit-zig-format.js->post-edit-format.js(prettier branch kept);pre-bash-zig-build.js->pre-bash-guard.js. The GC skill points atsrc/jsc/JSRef.rs..vscode/settings.json: drop the// Zigblock pointing at nonexistentvendor/zig/and the[zig]formatter config..gitattributes,.dockerignore: drop*.zig/.zig-cacheentries..github/workflows/format.yml,package.json: drop the Ban Words workflow step andbannedscript..zigpaths inpackages/bun-u{ws,sockets}/headers,StringBuilderBinding.cpp,TopExceptionScopeBinding.cpp,PipeWriter.rs,StandaloneModuleGraph.rs,yaml.rs,comptime_string_map.rs,bundler/Cargo.toml,windows-shim/Cargo.toml,install.ps1,rust.ts,scripts/build/deps/{zstd,libarchive}.tsat their.rsreplacements. External attribution URLs (github.com/.../*.zig) are left as-is.How we know it works
bun bdlinks cleanly against the regeneratedJS2Rust__*symbols; the hand-exporteddns.rssymbols were updated to match.hmr-runtime-client.tsbundles cleanly against the regeneratedgenerated.ts; all fourMessageId.*references it uses resolve to the same byte values.add_completions.rscompiles and the binary runs.test/internal/expect-call-counter.test.tspasses against all 75 matchers..zigfile anywhere; no ninja edge declares a.zigoutput; no.zigis tracked undersrc/ormisctools/.