From ccf7b54e8bd38fa2e2e75a0a7d5fca4afcbbbe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Sat, 5 Sep 2026 07:02:37 +0200 Subject: [PATCH 1/3] fix(ext-http): stub perry_ffi_run_pending for unit-test links Claude-Session: https://claude.ai/code/session_01YPfnmWZmSpSWpmnoXvH8z2 --- crates/perry-ext-http/src/test_async_shims.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/perry-ext-http/src/test_async_shims.rs b/crates/perry-ext-http/src/test_async_shims.rs index 6f642e5f85..45c21a58e9 100644 --- a/crates/perry-ext-http/src/test_async_shims.rs +++ b/crates/perry-ext-http/src/test_async_shims.rs @@ -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) {} From f2ab551a0febc5284bbf543988b49a8f7572e627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Sat, 5 Sep 2026 07:13:20 +0200 Subject: [PATCH 2/3] docs(api): regenerate the API reference for Bun.listen / Bun.connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 868787448 ("feat(bun): add TCP socket facades") added method("bun", "listen", false, None), method("bun", "connect", false, None), to crates/perry-api-manifest/src/entries/part_4.rs but never ran scripts/regen_api_docs.sh, so the derived docs have been stale since 2026-09-03 and the `check` job fails on its "Check for API docs drift" step: -Total: 3046 entries across 138 modules. +Total: 3048 entries across 138 modules. +- `connect` — module +- `listen` — module Regenerated with the script's own commands from a release build: `perry --print-api-manifest=markdown` and `--print-api-manifest=dts`. The manifest crate carries no target cfgs (only cfg(test)) and the `check` job runs on ubuntu, so this Linux-generated output is what CI regenerates. Claude-Session: https://claude.ai/code/session_01YPfnmWZmSpSWpmnoXvH8z2 --- docs/api/perry.d.ts | 6 +++++- docs/src/api/reference.md | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/api/perry.d.ts b/docs/api/perry.d.ts index c8c478c975..a2a6b00868 100644 --- a/docs/api/perry.d.ts +++ b/docs/api/perry.d.ts @@ -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 }; @@ -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; @@ -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; diff --git a/docs/src/api/reference.md b/docs/src/api/reference.md index 552694501d..dc3fde7ca7 100644 --- a/docs/src/api/reference.md +++ b/docs/src/api/reference.md @@ -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 @@ -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`)* From e5bc14238e1b7b07a67790931ddc4a794af652aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Sat, 5 Sep 2026 07:13:56 +0200 Subject: [PATCH 3/3] docs(changelog): add PR 9780 fragment Claude-Session: https://claude.ai/code/session_01YPfnmWZmSpSWpmnoXvH8z2 --- changelog.d/9780-bun-tcp-landing-followups.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 changelog.d/9780-bun-tcp-landing-followups.md diff --git a/changelog.d/9780-bun-tcp-landing-followups.md b/changelog.d/9780-bun-tcp-landing-followups.md new file mode 100644 index 0000000000..e0293d2f4e --- /dev/null +++ b/changelog.d/9780-bun-tcp-landing-followups.md @@ -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.