[PD-dev] pd compiled for web with emscripten
Claude Heiland-Allen
claude at mathr.co.uk
Wed Jan 9 18:36:22 CET 2019
Hi!
As a proof of concept I modified pure-data and libpd just enough to get
it to compile with Emscripten and run some patches:
https://mathr.co.uk/empd/
Only -nogui mode. You can make GUIs using SDL2 and OpenGL, or using
other web APIs (HTML forms, SVG, etc).
Performance (provided you compile in Release mode) is about 2x worse
than native in one of my tests.
Changes were mainly annoying rather than hard:
- Emscripten is stricter about calling function pointers with the
correct type, this means pd_typedmess explodes from 6 cases to 60.
- I also needed to special-case pd_objectmaker in more places, because
its methods have return values other than void.
- These type errors are only visible at runtime, so I may have missed
some - please report.
Some other smaller fixes I may make pull-requests for soon.
Claude
--
https://mathr.co.uk
More information about the Pd-dev
mailing list