mglaman / wasm-drupal

Drupal in WASM
https://wasm-drupal.mglaman.dev/
MIT License
22 stars 2 forks source link

Drupal on the Edge with Web Assembly

Run Drupal on the edge in your browser with Web Assembly.

This utilizes php-wasm and php-cgi-wasm by Sean Morris.

Want to learn more? Catch my session Running Drupal on the Edge with Web Assembly at DrupalCon Barcelona.

How it works

PHP has been compiled into Web Assembly.

Running locally

Docker with DDEV

Using DDEV you can build and run the playground locally.

ddev start
ddev make build

Visit https://wasm-drupal.ddev.site

Without Docker

Currently this requires NPM, PHP (with Composer) on the host machine and Docker.

make build

make serve

Open http://localhost

Click GO, wait for environment to launch.

Log in with

Debugging steps

Debuging the service worker

Visit chrome://serviceworker-internals/

Resetting IndexDB

  1. Open developer console
  2. Under "Application" tab, go to IndexDB
  3. Delete /persist and /config
  4. Unregister service worker
  5. Refresh.

Next steps