Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
70336ef
bindgen: move every Rust function that takes a `CallFrame` to schemas…
dylan-conway Oct 22, 2026
b2343d6
Keep `ERR_MISSING_ARGS` for `URL.revokeObjectURL()` and test `Bun.res…
dylan-conway Oct 22, 2026
acd9aa8
Name the schema `BunTest.bind.ts` so that a release build has it, and…
dylan-conway Oct 23, 2026
d343a1c
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 23, 2026
dac641d
bindgen: add `b.value`, make functions through one helper, and name s…
dylan-conway Oct 23, 2026
13b5a30
Merge remote-tracking branch 'origin/claude/bindgen-functions' into c…
dylan-conway Oct 23, 2026
4c5877f
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 23, 2026
432b725
Write `isValue` as a plain field so that Node runs the generator, and…
dylan-conway Oct 23, 2026
2355e41
Take a `BuildArtifact` in `URL.createObjectURL` as `main` does, free …
dylan-conway Oct 23, 2026
417eda0
Type the arguments and results of the moved functions in their schema…
dylan-conway Oct 23, 2026
7de0761
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 23, 2026
28d4d75
Add `.otherAsNull` for what is ignored unless it is of the type, name…
dylan-conway Oct 23, 2026
9262d0d
Make `.otherAsNull` go by the kind of a value, parse an enumeration b…
dylan-conway Oct 23, 2026
dc4c827
Borrow a dictionary argument that can be absent, skip the markdown op…
dylan-conway Oct 23, 2026
9d18931
Keep how an argument reaches the body with its type, and say what to …
dylan-conway Oct 23, 2026
52f16cf
Have a conversion say by what it returns that it threw, compare one s…
dylan-conway Oct 23, 2026
acb5a41
Refuse `b.null` outside a union, a range under a modifier in an array…
dylan-conway Oct 23, 2026
86b82ef
Escape a quote or a backslash in the switch label of an enumeration's…
dylan-conway Oct 23, 2026
5745562
Take `Array.prototype` as an array, as `Array.isArray` does
dylan-conway Oct 23, 2026
ac7f2ba
Expect `Array.prototype` as a tls option to be an empty array, as in …
dylan-conway Oct 23, 2026
3fcb01a
Add `requiredArguments`, which throws `ERR_MISSING_ARGS` for a shorte…
dylan-conway Oct 23, 2026
59f808f
Report `URL.createObjectURL()` as a wrong type, as Node does
dylan-conway Oct 23, 2026
4bd1e3a
Count `requiredArguments` in `.length` and the TypeScript types, and …
dylan-conway Oct 23, 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
  •  
  •  
  •  
78 changes: 59 additions & 19 deletions docs/project/bindgen.mdx

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions scripts/build/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,13 +814,10 @@ function emitJsModules({ n, cfg, sources, o, dirStamp }: Ctx): void {
resolve(cfg.codegenDir, "SyntheticModuleType.h"),
resolve(cfg.codegenDir, "BuiltinModuleKeys.h"),
resolve(cfg.codegenDir, "GeneratedJS2Native.h"),
// Rust sibling: include!()'d by src/runtime/generated_js2native.rs. Must be
// a declared output: bun_runtime's dep-info names it, and ninja can only
// rebuild that crate in the same build as this step if it knows the file.
resolve(cfg.codegenDir, "generated_js2native.rs"),
// Specifier → module-ID tag table: include!()'d by the
// `resolved_source_tag` module in src/jsc/lib.rs. Declared for the same
// reason as generated_js2native.rs.
// `resolved_source_tag` module in src/jsc/lib.rs. Must be a declared
// output: bun_jsc's dep-info names it, and ninja can only rebuild that
// crate in the same build as this step if it knows the file.
resolve(cfg.codegenDir, "generated_resolved_source_tag.rs"),
// Canonical builtin key -> BuiltinModuleKeys.h index: include!()'d by `builtin_module_key_index` in src/jsc/lib.rs.
resolve(cfg.codegenDir, "generated_builtin_module_key_index.rs"),
Expand Down
2 changes: 1 addition & 1 deletion src/bun_core/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ pub mod ffi {
///
/// Replaces the `// SAFETY: H is a ZST → mem::zeroed()` comment repeated
/// at every callback trampoline that smuggles a generic `H: Fn*` through C
/// (`uws_sys::thunk`, `sql_jsc::IntoJSHostFn`, `server_body::route_thunk`).
/// (`uws_sys::thunk`, `server_body::route_thunk`).
#[inline(always)]
pub fn conjure_zst<H>() -> H {
const {
Expand Down
3 changes: 1 addition & 2 deletions src/bun_core/string/escapeRegExp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ pub fn escape_reg_exp_for_package_name_matching<W: std::io::Write>(
writer.write_all(remain)
}

// The JS-facing wrappers (`jsEscapeRegExp` / `jsEscapeRegExpForPackageNameMatching`)
// live in the `*_jsc` crate as extension-trait methods.
// The JS-facing wrappers are in `src/jsc/bun_string_jsc.rs`.
2 changes: 0 additions & 2 deletions src/cares_sys/c_ares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,6 @@ pub const ARES_SOCKET_BAD: ares_socket_t = usize::MAX; // INVALID_SOCKET
#[cfg(not(windows))]
pub const ARES_SOCKET_BAD: ares_socket_t = -1;

// Bun__canonicalizeIP_ host fn: see bun_runtime::dns_jsc::cares_jsc

/// Creates a sockaddr structure from an address, port.
///
/// # Parameters
Expand Down
233 changes: 173 additions & 60 deletions src/codegen/bindgen-emit.ts

Large diffs are not rendered by default.

Loading
Loading