Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions changelog.d/9780-bun-tcp-landing-followups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**`Bun.listen` / `Bun.connect` are documented, and `perry-ext-http`'s unit
tests link again.** #9514's TCP socket facades added both methods to the
compile-time API manifest without regenerating the derived docs, so
`docs/src/api/reference.md` and `docs/api/perry.d.ts` had been stale since
2026-09-03 and the API-docs drift check failed on every run. They now list
both entries (3046 → 3048).

Separately, `js_bun_tcp_listen` drives the shared async runtime from its
bind-poll loop via `perry_ffi::run_pending`. `perry-ext-net` stubs that
symbol only under `#[cfg(test)]`, which does not apply when it is linked as
an ordinary dependency into `perry-ext-http`'s test binary, so release-linking
that crate failed with `undefined symbol: perry_ffi_run_pending`.
`perry-ext-http`'s test shim now provides it, alongside the
`perry_ffi_spawn_async` stub that exists for the same transitive reason.
`perry-ext-ws` was checked and does not need it.
6 changes: 6 additions & 0 deletions crates/perry-ext-http/src/test_async_shims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ pub extern "C" fn perry_ffi_spawn_blocking_with_reactor(
// host stdlib archive, which unit-test binaries do not link.
#[no_mangle]
pub extern "C" fn perry_ffi_spawn_async(_ctx: *mut c_void) {}

// Same story: `js_bun_tcp_listen` drives the shared runtime from its bind-poll
// loop (`perry_ffi::run_pending`), so linking perry-ext-net's object code into
// this crate's test binaries pulls the extern in with it.
#[no_mangle]
pub extern "C" fn perry_ffi_run_pending(_budget_ms: u64) {}
6 changes: 5 additions & 1 deletion docs/api/perry.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Auto-generated from Perry's API manifest (#465). Do not edit by hand.
// Source: perry-api-manifest::API_MANIFEST
// Coverage: 2089 entries across 136 modules
// Coverage: 2091 entries across 136 modules

type PerryI8 = number & { readonly __perryI8?: never };
type PerryI16 = number & { readonly __perryI16?: never };
Expand Down Expand Up @@ -375,6 +375,8 @@ declare module "bun" {
/** stdlib */
export function build(...args: any[]): any;
/** stdlib */
export function connect(...args: any[]): any;
/** stdlib */
export function deepEquals(...args: any[]): any;
/** stdlib */
export function file(...args: any[]): any;
Expand All @@ -387,6 +389,8 @@ declare module "bun" {
/** stdlib */
export function hash(...args: any[]): any;
/** stdlib */
export function listen(...args: any[]): any;
/** stdlib */
export function pathToFileURL(...args: any[]): any;
/** stdlib */
export function serve(options: any): any;
Expand Down
4 changes: 3 additions & 1 deletion docs/src/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This page is auto-generated from Perry's compile-time API manifest (`perry-api-manifest::API_MANIFEST`). It is the source of truth for what `perry compile` accepts; references to symbols not listed here produce `R005 UnimplementedApi` (issue #463). Stubs (#464) are flagged ⚠ — they link cleanly but no-op at runtime on the chosen target.

Total: 3046 entries across 138 modules.
Total: 3048 entries across 138 modules.

## Modules

Expand Down Expand Up @@ -429,12 +429,14 @@ Total: 3046 entries across 138 modules.
- `Terminal` — module
- `Transpiler` — module
- `build` — module
- `connect` — module
- `deepEquals` — module
- `file` — module
- `fileURLToPath` — module
- `gc` — module
- `generateHeapSnapshot` — module
- `hash` — module
- `listen` — module
- `pathToFileURL` — module
- `scan` — instance *(class: `Transpiler`)*
- `scanImports` — instance *(class: `Transpiler`)*
Expand Down
Loading