Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
792368f
fetch over HTTP/2: reject on a TLS alert after the handshake, and sto…
Jarred-Sumner Oct 16, 2026
af5743d
One bindgen: replace bindgen v1 and v2, add classes, generate the Rus…
dylan-conway Oct 16, 2026
e6f65f3
install: fix regressions and older bugs found after the package manag…
Jarred-Sumner Oct 16, 2026
f14a5a6
`bun lint --type-aware`: ask for types on demand instead of checking …
Jarred-Sumner Oct 16, 2026
0663016
Compile cache: skip the bytecode optimizer when writing entries (#45446)
robobun Oct 16, 2026
6ffebec
`bun lint`: warn when a tsconfig.json without `include` made it load …
Jarred-Sumner Oct 16, 2026
e25d24c
bake: options own their strings, in one set of types (#44496)
dylan-conway Oct 16, 2026
86da172
ci: bump mordant to 8ba3540 (#45463)
alii Oct 16, 2026
e4c638f
ci: bump mordant to 0d47474 (#45465)
alii Oct 16, 2026
8ba82c3
install: terse messages, quieter output, and retries that start at 50…
Jarred-Sumner Oct 16, 2026
4b1681a
bake: drop React-specific behavior from core ("use server", --server-…
alii Oct 16, 2026
288aca3
ci: bump mordant to 564c8da (#45478)
alii Oct 16, 2026
5866b5f
remove JSPromise Strong::from_value, its last caller is gone (#45481)
alii Oct 16, 2026
0a2f1c8
Bun.indexOfLine with the bindgen, and .allowShared for a SharedArrayB…
dylan-conway Oct 16, 2026
25411ea
`bun lint`, `bun fmt`, `bun check`: fix the open issues (#45482)
Jarred-Sumner Oct 16, 2026
d940fbe
Bump WebKit to 87ee10da087b (#45567)
dylan-conway Oct 16, 2026
21620e2
Define eighteen Bun.* functions with the bindgen (#45450)
dylan-conway Oct 16, 2026
f8bc171
install: replace a file at a command's name behind a symlinked node_m…
Jarred-Sumner Oct 16, 2026
f0e4f6b
test: pack the rename-retry fixture with Bun.Archive, not the system …
dylan-conway Oct 16, 2026
b28212a
bake: move the code into folders by job (no behavior change) (#45489)
alii Oct 16, 2026
0b2d346
bake: fix a plugin leak, ignoreDirs parsing, and a router crash (#45605)
alii Oct 16, 2026
d7562f2
YAML.parse: name a key that is a sequence or a mapping once the input…
dylan-conway Oct 16, 2026
4334326
install: accept a migrated yarn.lock whose resolutions key has a rang…
Jarred-Sumner Oct 17, 2026
f0c6cbc
WebSocket: real closing handshake, one failure path, `ws` rewritten o…
Jarred-Sumner Oct 17, 2026
321972a
test: start the exit timer in worker-terminate-lifetime.test.ts once …
dylan-conway Oct 17, 2026
7f3bc6a
test: reset with terminate() in the close() error tests of socket.tes…
dylan-conway Oct 17, 2026
abf6610
test: drop the 5 second timeout of load-same-js-file-a-lot.test.ts (#…
dylan-conway Oct 17, 2026
3214d0b
test: compare the tarballs of the overrides test in run-autoinstall.t…
dylan-conway Oct 17, 2026
be49315
test: give the registry.npmjs.org stand-in of the migration tests its…
dylan-conway Oct 17, 2026
57c4be7
test: keep hot() from being inlined in disallow-code-generation-from-…
dylan-conway Oct 17, 2026
4f4b46a
test: run harness-max-rss.test.ts and compile-rss.test.ts outside the…
dylan-conway Oct 17, 2026
0ffddcd
test(bake): remove the test that checks `Response.render` stays remov…
robobun Oct 17, 2026
ff8ad61
Add b.bytes and define thirty-five Bun.* functions with the bindgen (…
dylan-conway Oct 17, 2026
788087c
`bun lint`: JSON and Markdown natively, programs in parallel. `bun ch…
Jarred-Sumner Oct 17, 2026
017b243
sql: consolidate the open Bun.sql, bun:sqlite and node:sqlite pull re…
Jarred-Sumner Oct 17, 2026
c0e1716
`fs.realpath`: a backslash is part of the file name on POSIX, and eac…
dylan-conway Oct 17, 2026
c814409
Define Bun.CryptoHasher, the static hashers and Bun.sha with the bind…
dylan-conway Oct 17, 2026
bd68ea5
test: bind the blackhole listener to lo0 on macOS (#44413)
robobun Oct 17, 2026
5eab34d
test: have the grandchild of the crashed worker test in parallel.test…
dylan-conway Oct 17, 2026
d635666
test: ask the heap what keeps a graph alive in the 50 graphs test of …
dylan-conway Oct 17, 2026
ed799f0
test: yield the next chunk once the client has the first in async-ite…
dylan-conway Oct 17, 2026
47c8687
test: wait for the close callback in the batch test of node-dgram.tes…
dylan-conway Oct 17, 2026
0973e69
test: spell PATH one way in bunEnv on Windows (#45692)
dylan-conway Oct 17, 2026
fd539ca
Remove dead code from bun_lint, bun_sema, BunProcess.cpp, and NodeDir…
robobun Oct 18, 2026
ed68082
add bun bake: serve app/pages and app/server.ts (#45682)
alii Oct 18, 2026
9a22efd
test: rename the marker file into place in the macOS end-to-end test …
dylan-conway Oct 18, 2026
988d77a
test: install the signal storm handler of setTimeout.test.js with SA_…
dylan-conway Oct 18, 2026
534a4e1
test: wait for the child in module-graph-workers.test.ts only once th…
dylan-conway Oct 18, 2026
8014525
test: do not wait for a build that is already done in module-graph-is…
dylan-conway Oct 18, 2026
53296f9
test: compile eight components on Windows in the chain of functions t…
dylan-conway Oct 18, 2026
d0831bc
Check published types against the bindgen schemas, honor `memLevel` a…
dylan-conway Oct 18, 2026
5667cd6
sql: fixes for problems found after the consolidation (#45304) (#45711)
Jarred-Sumner Oct 18, 2026
ed58ba2
Move 58 small natives of `node:*` and `Bun` to bindgen schemas (#45851)
dylan-conway Oct 18, 2026
bc1030a
WebSocket client: follow-up fixes to #45223 (#45720)
Jarred-Sumner Oct 18, 2026
4354b80
install: more fixes after the package manager consolidation (#45710)
Jarred-Sumner Oct 18, 2026
25ef693
bun bake: build plugins from bake.config.ts (#45828)
alii Oct 18, 2026
5900354
bun bake: start again when bake.config.ts changes (#45902)
alii Oct 18, 2026
ad4089b
bun bake: .tsx pages and frameworks in bake.config.ts (#45905)
alii Oct 18, 2026
e3f9100
chore: sync upstream oven-sh/bun main (2026-10-18)
steipete Oct 18, 2026
cae38f3
fix: preserve entry timing and header conversion through sync
steipete Oct 18, 2026
cabfa81
fix: qualify upstream runtime and preserve inherited behavior
steipete Oct 18, 2026
346dbe9
fix: satisfy sync lint and import checks
steipete Oct 18, 2026
e2144a7
build: pin WebKit a2976f02 for upstream sync
steipete Oct 19, 2026
cc31b98
test: expect macOS native realpath results that match Node
steipete Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 9 additions & 7 deletions .claude/skills/implementing-jsc-classes-rust/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: Creates JavaScript classes using Bun's Rust bindings generator (.cl

Bridge JavaScript and Rust through `.classes.ts` definitions and Rust implementations.

`src/codegen/bindgen.ts` (`*.bind.ts`, `docs/project/bindgen.mdx`) is replacing this generator: typed arguments, and the struct stored inside the JS object. Use it for a class whose struct only the JS object owns. It does not do ref-counted or shared structs, `hasPendingActivity`, `estimatedSize` or writing to a cached getter's slot yet.

## Architecture

1. **JavaScript Interface Definition** (`.classes.ts` files)
Expand All @@ -18,7 +20,7 @@ Bridge JavaScript and Rust through `.classes.ts` definitions and Rust implementa
```typescript
export default [
define({
name: "Glob",
name: "Matcher",
construct: true,
finalize: true,
hasPendingActivity: true,
Expand All @@ -45,16 +47,16 @@ use bun_jsc::{CallFrame, JSGlobalObject, JSValue, JsResult};
use std::sync::atomic::{AtomicUsize, Ordering};

#[bun_jsc::JsClass]
pub struct Glob {
pub struct Matcher {
pattern: Box<[u8]>,
has_pending_activity: AtomicUsize,
}

impl Glob {
pub fn constructor(global: &JSGlobalObject, frame: &CallFrame) -> JsResult<Box<Glob>> {
impl Matcher {
pub fn constructor(global: &JSGlobalObject, frame: &CallFrame) -> JsResult<Box<Matcher>> {
let arg = frame.argument(0);
let pattern = bun_core::String::from_js(arg, global)?.to_utf8_bytes().into();
Ok(Box::new(Glob { pattern, has_pending_activity: AtomicUsize::new(0) }))
Ok(Box::new(Matcher { pattern, has_pending_activity: AtomicUsize::new(0) }))
}

#[bun_jsc::host_fn(method)]
Expand Down Expand Up @@ -88,7 +90,7 @@ A missing or mis-typed hook is a **compile error** in `cargo check -p bun_runtim
The codegen also emits a `js_$T` module with the cached-value accessors. Re-export it when you need `*_set_cached` / `*_get_cached` or `detach_ptr`:

```rust
pub use crate::generated_classes::js_Glob as js;
pub use crate::generated_classes::js_Image as js;
// or
bun_jsc::impl_js_class_via_generated!(Archive => crate::generated_classes::js_Archive);
```
Expand Down Expand Up @@ -124,7 +126,7 @@ Never store raw `JSValue` in a struct field. Declare a slot in `.classes.ts` (`v

## Reference implementations

- `src/runtime/api/glob.rs` + `Glob.classes.ts` — constructor, methods, `hasPendingActivity`, default finalize
- `src/runtime/api/Shell.classes.ts` — constructor, methods, `hasPendingActivity`
- `src/runtime/api/cron.rs` + `cron.classes.ts` — `noConstructor`, cached getter, `values: [...]`, custom finalize
- `src/runtime/image/Image.rs:56` — the `pub use crate::generated_classes::js_Image as js;` one-liner
- `src/jsc/host_fn.rs` — the host-fn adapters the codegen dispatches through
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/bun-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ on:
- "packages/bun-types/**"
- "test/integration/bun-types/**"
- "src/cli/init/tsconfig.default.json"
- "src/**/*.bind.ts"
- "src/codegen/**"
- ".github/workflows/bun-types.yml"
pull_request:
paths:
- "packages/bun-types/**"
- "test/integration/bun-types/**"
- "src/cli/init/tsconfig.default.json"
- "src/**/*.bind.ts"
- "src/codegen/**"
- ".github/workflows/bun-types.yml"

env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust-lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "src/**/*.rs"
- "src/**/Cargo.toml"
- "src/**/*.classes.ts"
- "src/**/*.bind.ts"
- "src/codegen/**"
- "scripts/build/**"
- "scripts/build.ts"
Expand Down Expand Up @@ -132,7 +133,7 @@ jobs:
# The pinned commit of https://github.com/scarletindustries/mordant.
# Bumping it is a PR of its own, where whatever the new revision finds
# gets fixed or added to mordant-baseline.toml.
MORDANT_REV: c5e56d0d9ca6e2adbb3488b7677353f26cd99ba8
MORDANT_REV: 564c8da5cb0d4fc9b1717b4b42e6e60dbeef237b
# The nightly in mordant's rust-toolchain file at MORDANT_REV. mordant is
# built with it and links its rustc, so it is also the compiler that
# checks this workspace while the lints run, and it must still be able
Expand Down
6 changes: 0 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
"printWidth": 80
}
},
{
"files": ["src/codegen/bindgenv2/**/*.ts", "*.bindv2.ts"],
"options": {
"printWidth": 100
}
},
{
"files": ["src/runtime/cli/init/**"],
"options": {
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Sync oven-sh/bun through `ad4089bf49d9f4c3ab7c8d95a58f3e0f0f186054`, including lint, format, binding, WebSocket and SQL updates, while retaining the fork runtime and CI contracts.

- Share identical `node:vm` script and compiled-function source buffers and source-map URI strings through a bounded per-VM weak index, including after compilation-cache eviction.

- Honor `BUN_FEATURE_FLAG_DISABLE_SOURCE_MAPS` on transpiler-cache hits and prevent startup crashes from cached modules without maps. Adapts empty-map validation from [oven-sh/bun#42412](https://github.com/oven-sh/bun/pull/42412); thanks @robobun.
Expand Down
26 changes: 25 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"src/collections",
"src/css",
"src/errno",
"src/glob",

Check warning on line 11 in Cargo.toml

View workflow job for this annotation

GitHub Actions / lol-html cargo test

explicit `package.readme` can be inferred
"src/http",
"src/install",
"src/install/windows-shim",
Expand All @@ -32,6 +32,8 @@
"src/lint/unicorn",
"src/lint/react",
"src/lint/jest",
"src/lint/json",
"src/lint/markdown",
"src/lint/graph",
"src/lint/react_compiler",
"src/lint/driver",
Expand Down Expand Up @@ -397,6 +399,8 @@
bun_lint_unicorn = { path = "src/lint/unicorn" }
bun_lint_react = { path = "src/lint/react" }
bun_lint_jest = { path = "src/lint/jest" }
bun_lint_json = { path = "src/lint/json" }
bun_lint_markdown = { path = "src/lint/markdown" }
bun_lint_graph = { path = "src/lint/graph" }
bun_lint_react_compiler = { path = "src/lint/react_compiler" }
bun_format = { path = "src/format" }
Expand Down
Loading
Loading