Skip to content

Expose SQLite auto-extension symbols to JS ABI - #3641

Merged
adamziel merged 2 commits into
trunkfrom
adamziel/export-sqlite-auto-extension-js-abi
May 14, 2026
Merged

Expose SQLite auto-extension symbols to JS ABI#3641
adamziel merged 2 commits into
trunkfrom
adamziel/export-sqlite-auto-extension-js-abi

Conversation

@adamziel

Copy link
Copy Markdown
Collaborator

What

Adds _sqlite3_auto_extension and _sqlite3_cancel_auto_extension to the PHP wasm JS ABI export list.

Why

@php-wasm/node-8-4@3.1.31 exports these symbols from the wasm binary, but the generated JS runtime does not expose them to the dynamic linker symbol map. External side modules that import sqlite3_auto_extension fail during startup with resolved is not a function.

Testing

  • Confirmed wasm-objdump sees the wasm exports in @php-wasm/node-8-4@3.1.31.
  • Confirmed a side module import still resolves as undefined through the generated JS dynamic linker.
@adamziel
adamziel requested review from a team, Copilot and mho22 May 14, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds SQLite auto-extension symbols to the PHP wasm JS ABI export list so external side modules can resolve them via the dynamic linker.

Changes:

  • Add _sqlite3_auto_extension to exported functions list
  • Add _sqlite3_cancel_auto_extension to exported functions list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamziel
adamziel merged commit 049cbb3 into trunk May 14, 2026
53 checks passed
@adamziel
adamziel deleted the adamziel/export-sqlite-auto-extension-js-abi branch May 14, 2026 17:16
adamziel added a commit that referenced this pull request May 14, 2026
…3642)

This updates the generated Node PHP 8.4 JSPI wasm artifact after #3641
so the npm package includes the newly exported SQLite auto-extension
symbols. The CLI side module imports sqlite3_auto_extension and
sqlite3_cancel_auto_extension when loading php-extension side modules;
without these exports @wp-playground/cli fails with `resolved is not a
function`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment