Export SQLite auto-extension symbols for PHP.wasm side modules#3524
Merged
Conversation
af4b6db to
a97e977
Compare
0316c21 to
94e808c
Compare
a97e977 to
ff0a3a3
Compare
94e808c to
e0d3db0
Compare
0cc451f to
74f61e1
Compare
ec5eb5c to
90ef8b9
Compare
90ef8b9 to
f56274e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Exports SQLite auto-extension APIs from PHP.wasm builds so external side modules can register SQLite virtual table modules during PHP startup (needed by the markdown editor extension workflow).
Changes:
- Add
sqlite3_auto_extensionto the Asyncify-related symbol list for the PHP.wasm build. - Add
sqlite3_cancel_auto_extensionto the Asyncify-related symbol list for the PHP.wasm build.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/php-wasm/compile/php/Dockerfile | Adds SQLite auto-extension symbols to the Asyncify symbol list for the default PHP.wasm build. |
| packages/php-wasm/compile/php/Dockerfile-5-2 | Adds SQLite auto-extension symbols to the Asyncify symbol list for the PHP 5.2 PHP.wasm build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1444
to
1452
| "sqlite_handle_closer",\ | ||
| "sqlite_handle_doer",\ | ||
| "sqlite_handle_preparer",\ | ||
| "sqlite3_auto_extension",\ | ||
| "sqlite3_autovacuum_pages",\ | ||
| "sqlite3_backup_step",\ | ||
| "sqlite3_bind_pointer",\ | ||
| "sqlite3_cancel_auto_extension",\ | ||
| "sqlite3_exec",\ |
Comment on lines
1461
to
1469
| "sqlite_handle_closer",\ | ||
| "sqlite_handle_doer",\ | ||
| "sqlite_handle_preparer",\ | ||
| "sqlite3_auto_extension",\ | ||
| "sqlite3_autovacuum_pages",\ | ||
| "sqlite3_backup_step",\ | ||
| "sqlite3_bind_pointer",\ | ||
| "sqlite3_cancel_auto_extension",\ | ||
| "sqlite3_exec",\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Exports SQLite's
sqlite3_auto_extension()andsqlite3_cancel_auto_extension()symbols from PHP.wasm main modules.Rationale
External PHP.wasm side modules can register SQLite virtual table modules by
calling
sqlite3_auto_extension()during PHP startup. The markdown editor nowlives in
adamziel/wp-extensionsand uses this path to register itsmarkdown_postsandmarkdown_postmetavirtual tables.The current published
@wp-playground/cli@3.1.30cannot run that extension:it does not expose the complete
--php-extensionworkflow, and its PHP.wasmbuilds do not export these SQLite symbols. This PR is the Playground-side
runtime change needed before the
wp-extensionsinstructions can use apublished CLI release.
Related feature PR: adamziel/wp-extensions#1
Implementation
Adds
sqlite3_auto_extensionandsqlite3_cancel_auto_extensionto theAsyncify export lists in:
packages/php-wasm/compile/php/Dockerfilepackages/php-wasm/compile/php/Dockerfile-5-2The markdown-editor command, mu-plugin, SQLite extension source, and
php-toolkitsubmodule are intentionally not in this Playground PR.Testing instructions
Full verification requires recompiling PHP.wasm and loading an external side
module that calls
sqlite3_auto_extension(). The consumer lives inadamziel/wp-extensions#1.