Skip to content

ABI: implement exact WTF parsing, CPU, allocator, and HTTP-date helpers #214

Description

@chrisbbreuer

Parent: #134
Profiles: #163, #164

Implement the five pinned WTF.zig native imports:

  • WTF__parseDouble
  • WTF__parseES5Date
  • WTF__numberOfProcessorCores
  • WTF__releaseFastMallocFreeMemoryForThisThread
  • Bun__writeHTTPDate

Acceptance criteria:

  • Match WebKit FastFloat prefix parsing: no leading whitespace, optional sign, decimal/fraction/exponent grammar, exact consumed-byte count, no Infinity/NaN spelling.
  • Match the pinned WebKit ES5 date grammar, validation, fractional milliseconds, leap-second handling, timezone forms, and NaN failures without accepting legacy date text.
  • Report at least one online processor and clamp safely to the C ABI range.
  • Define the FastMalloc-release operation correctly for zig-js allocator ownership (no retained per-thread FastMalloc cache).
  • Write exact RFC 7231 IMF-fixdate bytes, honor timestamp-zero and bounded snprintf-style output semantics, and avoid buffer overrun.
  • Add focused boundary tests and link/runtime fixture coverage for all five symbols.
  • Refresh Home/Bun inventories, README/docs, and parent issues with exact evidence.

Backward compatibility remains out of scope for the pre-release tool.

Implementation: d0a951c4
Documentation/inventories: 2eb274e5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions