Experimental branch that compiles daw2logic to WebAssembly with py2wasm (Nuitka WASI fork) and serves a static web UI on GitHub Pages.
Browser (web/)
└─ @wasmer/sdk runs daw2logic.wasm (WASI)
└─ stdin: .dawproject zip bytes
└─ stdout: framed notes + .logicx.zip bytes
Python sources
wasm/main.py WASI entry (stdin/stdout)
daw2logic/wasm_api.py in-memory convert + wire format
The web app never uploads files to a server — conversion runs entirely in the browser once the WASM module is loaded.
python tests/fixtures/build_bitwig_simple.py
pytest tests/test_wasm_api.py -qRequires Python 3.11 and a C compiler (clang / gcc).
bash scripts/build_wasm.shThis installs the Wasmer py2wasm fork into .venv-wasm, compiles wasm/main.py → web/wasm/daw2logic.wasm, and smoke-tests with wasmer run when available.
Serve the web/ directory over HTTP (required for ES modules + WASM fetch):
python -m http.server 8080 --directory web
open http://localhost:8080For @wasmer/sdk threading, the page uses coi-serviceworker to enable cross-origin isolation headers locally and on GitHub Pages.
Push to main — the wasm-pages workflow:
- Checks out submodules (LogicProFormatWriter seeds are required at compile time)
- Builds
web/wasm/daw2logic.wasmon Ubuntu - Deploys the
web/folder to GitHub Pages
Enable Pages in repo settings: Source → GitHub Actions.
| Topic | Status |
|---|---|
| py2wasm on PyPI | Standard PyPI py2wasm is upstream Nuitka without WASI — use the lum1n0us fork via scripts/build_wasm.sh |
| WASI C extensions | Nuitka standalone tries dlopen for stdlib C modules; scripts/patch_nuitka_wasi.py + scripts/build_wasi_zlib.sh link PyInit_zlib for zipfile |
| Logic seeds at runtime | WASM cannot use Nuitka package-data paths; build_wasm.sh copies seeds to web/wasm/logicx/data/ and smoke/CI mount them at /seeds |
| Python version | WASM build requires 3.11 (not 3.12+) |
| Binary size | Full converter + libpython WASM is large (expect tens of MB) |
| Browser headers | Needs COOP/COEP for Wasmer SDK; handled via service worker on Pages |
| Browser seeds | app.js fetches web/wasm/logicx/data/* and mounts them at /seeds for the WASI module |
| Folder drop | UI currently accepts .dawproject files only; folder → zip client-side is TODO |
| AU sidecars | Same as CLI — presets export to sidecar paths inside the bundle zip |
If the WASI fork stops working, fallbacks to evaluate: Pyodide (interpreter, easier but slower) or a Rust/WASM rewrite of the hot path.
u32 notes_len LE
u32 zip_len LE
notes_utf8[notes_len]
logicx_zip[zip_len]
Implemented in daw2logic/wasm_api.py (pack_conversion_result / unpack_conversion_result).