Skip to content

Add a demo website that runs the validator in the browser with WebAssembly - #12

Merged
xavierlacot merged 1 commit into
jolicode:mainfrom
lyrixx:feat/website-wasm-demo
Nov 17, 2026
Merged

xavierlacot merged 1 commit into
jolicode:mainfrom
lyrixx:feat/website-wasm-demo

Conversation

@lyrixx

@lyrixx lyrixx commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

It adds website/, a static page that runs the validator in the browser: PHP is built as WebAssembly with lyrixx/php-wasm-builder, with the library of the working directory embedded. castor website:build, website:check and website:serve build, test and serve it, and a new workflow deploys it to GitHub Pages from main.

Why

asked on a private repo

Validating a URL is not there: a page can only read another website when that website allows it with CORS headers, and almost none does for its pages. PHP has no network of its own in WebAssembly, so it would go through the same fetch(). It would need a proxy, so a server.

To do after the merge: in the settings of the repository, GitHub Pages must deploy from GitHub Actions.

Checklist

  • Tests pass (castor qa:phpunit:run): not run, the library is untouched. castor website:check passes.
  • Coding standards applied (castor qa:cs)
  • Static analysis passes (castor qa:phpstan): 2 errors in src/JsonLd/Algorithms/Expand/Expander.php on my machine, that main has too.
  • Tests added or updated for the change
  • Documentation updated if needed

home result

cc @xavierlacot

@lyrixx
lyrixx marked this pull request as ready for review November 13, 2026 18:56
@xavierlacot xavierlacot mentioned this pull request Nov 17, 2026
5 tasks done
@xavierlacot

Copy link
Copy Markdown
Member

Thanks for the contribution! I am merging this PR now. The PR #13 complements it and will be merged in a few minutes.

@xavierlacot
xavierlacot merged commit 9b45b34 into jolicode:main Nov 17, 2026
6 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