bun_core: delete unused MapLike trait, FieldType marker, EmbedDir (#31543)
Follow-up to #31536 — removes the remaining unused comptime-reflection placeholders from `util.rs` plus a few `bun_core` strays. `cargo check --workspace` passes. ## Why this code exists `src/bun_core/util.zig` is **not `@import`ed anywhere** in `src/**/*.zig` (every `util` import points at `runtime/shell/util.zig`, `node/util/validators.zig`, etc.; `bun.zig` does not re-export it). So everything ported from that file was dead from day one. | Item | Zig original | Zig callers | Status | |---|---|---|---| | `MapLike` trait | none — Zig used comptime duck-typing (`Map.KV`, `@hasField`, `@FieldType` builtin) | n/a | **Rust-port artifact** (translation of the comptime probes) | | `Key<M>` / `Value<M>` | `src/bun_core/util.zig:3,7` | 0 — not even used inside `util.zig` (`fromMapLike` calls the `@FieldType` builtin directly) | **dead in Zig too** | | `from_entries` | `util.zig:11` (`fromEntries`) | 0 external — only called by `from()` at `:151,153`, which has 0 callers | **dead in Zig too** | | `from_map_like` | `util.zig:80` (`fromMapLike`) | 0 external — only called by `from()` at `:139` | **dead in Zig too** | | `FieldType` enum | `util.zig:101` (a `fn → ?type`) | 0 external — all grep hits are the Zig builtin `@FieldType` or unrelated SQL enums | **dead in Zig too** (and obsoleted by Zig's builtin `@FieldType`) | | `EmbedDir` | none — neither `EmbedDir` nor `EmbedKind` exist in `*.zig` | n/a | **Rust-port artifact** (alias for an alternate Rust-side spelling) | | `buffered_reader_size` | `src/bun_core/deprecated.zig:47` (`bufferedReaderSize`) | 0 | **dead in Zig too** | | `auto_format_label` / `_fallback` | `deprecated.zig:639,631` | 2 — `src/runtime/node.zig:342`, `src/runtime/test_runner/expect.zig:122` | Zig callers' Rust ports use native `Display`/`Debug` instead of comptime format-label dispatch | | `PathString::USE_SMALL_PATH_STRING` | `src/string/PathString.zig:12` (`pub const use_small_path_string`) | 0 — `PathString.zig` only reads the file-private `use_small_path_string_` (`:2`); the `pub` re-export has no consumers | **dead in Zig too** (the public const; the private backing value is still load-bearing) | Also updates the stale port-note comment in `bundler/options.rs` that pointed at the deleted `MapLike`.
D
Dylan Conway committed
937b075080571292d806f6a91a0991ce6b228ae5
Parent: 314bae5
Committed by GitHub <noreply@github.com>
on 5/29/2026, 1:56:51 AM