ReviewOS

zig-utils/zig-js

Implement FetchHeaders core lifecycle and buffer ABI

#376
Closed chris opened this 9 days ago ·
9 days ago

Parent: #375

Implement the 21 FetchHeaders exports that do not dereference UWS/H3/Pico request or response objects: branding/casts, JS conversion, native lifetime, create/clone paths, StringPointer creation and copying, validated mutations and queries, counts, and fast HTTPHeaderName operations.

Acceptance:

  • One branded ordered Headers representation backs JS and native handles.
  • Standalone createEmpty/createValueNotJS handles have explicit ownership and deref behavior.
  • createFromJS, createValue, toJS, clone, and cloneThis preserve VM ownership and exact exception semantics.
  • append/set/get/has/remove and fast operations match Fetch normalization, combination, Set-Cookie, and enum mapping.
  • count/copyTo report exact iterator rows and UTF-8 buffer sizes with checked u32 bounds.
  • Add Debug and ReleaseSafe Home/Bun compile-link-runtime evidence, refresh inventories/docs/CI, and push as one focused main commit.
9 days ago

Implemented and pushed in 975386e2 (core) and b4a9f717 (fixtures, CI, and docs).

Evidence:

  • one branded, independently ref-counted native record backs JS Headers and the C ABI
  • all 21 scoped exports pass the Bun runtime matrix (21/21)
  • Home private ABI fixture passes 384/384 in Debug and ReleaseSafe when run in isolation
  • focused Headers tests pass 4/4; FetchHeaders unit tests pass 2/2
  • inventories now classify Home 397/471 and Bun 389/461
  • the parallel-build shared-memfd flake is isolated and tracked separately in #379

The four foreign-object adapters remain intentionally out of this core slice under #377.

Sign in to comment on this issue.