Skip to content

Add native extension GitHub Pages demo#408

Merged
adamziel merged 1 commit into
gh-pagesfrom
adamziel/show-native-extension-pages
May 26, 2026
Merged

Add native extension GitHub Pages demo#408
adamziel merged 1 commit into
gh-pagesfrom
adamziel/show-native-extension-pages

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

What changed

  • Adds a friendly GitHub Pages landing page for SQLite Database Integration.
  • Adds a Native MySQL Parser Extension page with links to the published WASM manifest and checksums.
  • Adds native-extension/blueprint.json for the canonical Playground demo URL.
  • Adds native-extension/benchmark.json with the latest local benchmark data used by the docs/demo.

Why

The WASM extension artifacts are already published from gh-pages, but users need a discoverable page and Playground entry point to test them.

Validation

  • python3 -m json.tool native-extension/blueprint.json
  • python3 -m json.tool native-extension/benchmark.json
  • npx @wp-playground/cli@latest run-blueprint --blueprint=.context/gh-pages-worktree/native-extension/blueprint.json

Note: opening the canonical Playground URL against production currently 404s on the Blueprint until this PR lands on gh-pages.

@adamziel adamziel marked this pull request as ready for review May 26, 2026 20:04
@adamziel adamziel merged commit da5dd0e into gh-pages May 26, 2026
@adamziel adamziel deleted the adamziel/show-native-extension-pages branch May 26, 2026 20:05
adamziel added a commit that referenced this pull request May 26, 2026
## What changed

Reorganizes the root README so Quick start stays first and the optional
Native MySQL Parser Extension is discoverable without taking over the
landing flow. The README links to the GitHub Pages landing page with the
published WASM release list, manifest links, “Run in Playground”
buttons, and native extension details.

Also expands `packages/php-ext-wp-mysql-parser/README.md` with local
build/load instructions, WASM artifact details, checksum verification
steps, and benchmark commands. The benchmark scripts now run cleanly on
PHP 8.4+, can emit JSON, report exact processed counts, and the parser
benchmark goes through the integration loader so `php -d extension=...`
measures the native parser path instead of accidentally staying on the
pure-PHP classes.

## Why

The native extension and WASM artifacts were hard to discover. This
keeps the normal README quick start prominent while giving users a clear
path to optional native-extension docs, Playground links, and
reproducible benchmark commands.

## Self-review fixes

- Fixed benchmark query counts to use an explicit processed counter
instead of loop-index arithmetic.
- Fixed `run-parser-benchmark.php` to include the first query and to
load through `src/load.php`, matching runtime native-vs-PHP class
selection.
- Tightened docs so build commands do not leave readers in the package
directory before repository-root verification commands.
- Added checksum verification commands and refreshed benchmark numbers,
including native parser results.

## Related Pages work

- GitHub Pages native-extension demo: #408 (merged)
- GitHub Pages release list + Playground CLI instructions: #409 (merged)
- GitHub Pages benchmark refresh: #410 (merged)
- Published page:
https://wordpress.github.io/sqlite-database-integration/

## Validation

- `composer validate --no-check-all`
- `php -l packages/mysql-on-sqlite/tests/tools/run-lexer-benchmark.php`
- `php -l packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php`
- `php -l
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php`
- `php packages/mysql-on-sqlite/tests/tools/run-lexer-benchmark.php
--json --limit=100`
- `php packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php
--json --limit=100`
- `php
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php
--json --limit=100`
- `php -d extension=/path/to/libwp_mysql_parser.dylib
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php
--json --limit=100`
- `php -d extension=/path/to/libwp_mysql_parser.dylib
packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php --json
--limit=100`
- Full benchmark rerun for published numbers: lexer PHP, parser PHP,
native lexer, native parser.
- `npx @wp-playground/cli@latest run-blueprint --php=8.4
--php-extension=https://wordpress.github.io/sqlite-database-integration/wp_mysql_parser-wasm-extension/latest/manifest.json
--blueprint=https://wordpress.github.io/sqlite-database-integration/native-extension/blueprint.json
--verbosity=quiet`

Note: `composer run check-cs` could not run in this workspace because
`vendor/bin/phpcs` is not installed locally; CI runs it with
dependencies installed.
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.

1 participant