mirror of
https://github.com/oven-sh/bun.git
synced 2026-04-03 07:02:44 +00:00
## What Removes the CMake build system. The TypeScript build (`scripts/build/`) has been the primary build path for a while; this deletes the legacy path. ## Changes **Deleted (~6200 lines)** - `cmake/` — all targets, toolchains, tools, analysis, Sources.json - `CMakeLists.txt` - `scripts/build.mjs` — the old cmake wrapper - `scripts/glob-sources.mjs` — the old Sources.json→txt generator - 14 package.json scripts that invoked the above (`build:cmake:*`, `analysis*`, `clang-tidy*`, `zig-format*`, `zig:test*`) **Source patterns: `cmake/Sources.json` → `scripts/glob-sources.ts`** Patterns are now inlined as a typed const with `Sources` derived via `keyof typeof patterns`. Also runnable as a CLI: ```sh bun scripts/glob-sources.ts cxx # one .cpp path per line bun scripts/glob-sources.ts --all # every source list ``` Uses `node:fs` `globSync` so it runs under both Bun and Node. Consumers updated: `configure.ts`, `run-clang-format.sh`, `ban-words.test.ts`, `lldb-inline-tool.cpp`, `cppbind.ts`, `sync-webkit-source.ts`. **New: `bun run clean`** ```sh bun run clean # build/debug/ bun run clean release # build/release/ bun run clean debug-local # build/debug-local/ + vendor/WebKit/WebKitBuild/Debug bun run clean zig # zig caches across all profiles bun run clean cpp # obj/ + pch/ across all profiles bun run clean deep # build/, vendor/* (except WebKit), zig caches bun run clean --help ``` The `deep` vendor list is derived from `allDeps` in `scripts/build/deps/index.ts`, so new dependencies are picked up automatically. **Docs updated** CONTRIBUTING.md and docs/project/contributing.mdx now point at `scripts/build/deps/webkit.ts` for `WEBKIT_VERSION` and the `--asan=off` flag for disabling ASAN. ## Notes - `cmake` the tool is still required — vendored deps (zstd, libarchive, boringssl, etc.) build via nested cmake - `scripts/bump.ts` was already missing (deleted in an earlier commit); the bump action and package.json script that reference it are pre-existing breakage - `test/js/bun/util/zstd.test.ts` has a snapshot of the old package.json as compression test data; will need a snapshot regen --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>