Skip to content

Load external PHP.wasm extension manifests#1843

Merged
chubes4 merged 1 commit into
mainfrom
feat/1825-php-extension-manifests
Jul 18, 2026
Merged

Load external PHP.wasm extension manifests#1843
chubes4 merged 1 commit into
mainfrom
feat/1825-php-extension-manifests

Conversation

@chubes4

@chubes4 chubes4 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Let recipe callers declare startup-loaded PHP.wasm extension manifests through a generic JSPI-only runtime contract.

What changed

  • Validate recipe-local or HTTPS manifest references, preserve them through dry-run/runtime normalization, and resolve local paths without traversal.
  • Forward each manifest as the installed @php-wasm/node manifestUrl contract to every pooled programmatic PHP runtime instance.
  • Fail with a structured capability diagnostic when external manifests are requested on Asyncify.

How to test

  1. Run npm install; expect Workspace dependencies install successfully..
  2. Run npm exec -- tsx tests/php-wasm-extension-manifests.test.ts; expect The manifest contract test prints php wasm extension manifests ok..
  3. Run npm run build; expect All runtime-core, runtime-playground, and CLI TypeScript projects compile..

Compatibility

Backwards compatible: recipes without runtime.extensions are unchanged. Consumers opting into external manifests require a JSPI-capable Node runtime and ABI-compatible extension artifacts; Asyncify requests fail explicitly. No WPCOM, Sodium, or product-specific behavior is added to WP Codebox.

Evidence

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode
  • Model: openai/gpt-5.6-terra
  • Used for: Implemented the generic manifest contract and tests; OpenCode GPT-5.6 Sol reviewed the runtime boundary and coordinated deterministic gate feedback with Chris.

Source relationships

@chubes4
chubes4 merged commit 831f56e into main Jul 18, 2026
4 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.

Provide PHP Sodium capability for WPCOM PHPUnit runtimes

1 participant