Skip to content

[codex] fix HTTP external symbol linking#4216

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-http-ext-symbol-linking
Jun 3, 2026
Merged

[codex] fix HTTP external symbol linking#4216
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-http-ext-symbol-linking

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

This addresses the HTTP compile/linking portion of #3954.

  • Register emitted node:http / node:https client and server wrapper symbols with the http well-known owner so native-table lowering pulls perry-ext-http into the link line.
  • Register the HTTP agent socket listener helpers with the net well-known owner so perry-ext-net is linked for those emitted symbols.
  • Keep well-known prebuilt wrapper resolution active under PERRY_NO_AUTO_OPTIMIZE=1, while still letting runtime/stdlib fall back to the prebuilt full archives.
  • Extend the perry-ext-http force-link anchor so the archive retains newer HTTP server/IncomingMessage/ServerResponse entry points.

Validation

  • cargo fmt --all -- --check
  • cargo test -p perry-codegen emitted_http_suite_external_symbols_route_to_owners -- --nocapture
  • cargo build --release --quiet -p perry -p perry-runtime -p perry-stdlib -p perry-ext-http -p perry-ext-net
  • git diff --check
  • ./scripts/check_file_size.sh
  • PERRY_NO_AUTO_OPTIMIZE=1 npm exec --yes --package=node@26 -- bash -lc 'node --version; ./run_parity_tests.sh --suite node-suite --module http'
    • Node v26.3.0
    • 5 parity pass / 12 parity fail / 0 compile fail / 0 skipped
    • report: test-parity/reports/parity_report_20260603_055225.json
    • nonzero exit is from the parity threshold; remaining failures are output/behavior mismatches, not compile/link failures
  • nm -g target/release/libperry_ext_http.a spot-checks show representative HTTP symbols present.
  • nm -g target/release/libperry_ext_net.a spot-checks show representative net socket listener symbols present.

Register emitted HTTP and net wrapper symbols with their well-known owners so native-table calls pull the correct static libraries.

Keep well-known prebuilt wrapper resolution active when PERRY_NO_AUTO_OPTIMIZE skips stdlib specialization, and force-retain HTTP server symbols in libperry_ext_http.a.
@proggeramlug proggeramlug marked this pull request as ready for review June 3, 2026 06:25
@proggeramlug proggeramlug force-pushed the codex/node-compat-http-ext-symbol-linking branch from 9bc4e5d to b1242c1 Compare June 3, 2026 06:25
@proggeramlug proggeramlug merged commit 9145cc7 into PerryTS:main Jun 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants