[Pas2js] FPC and WebAssembly
Michael Van Canneyt
michael at freepascal.org
Fri Dec 24 14:13:24 CET 2021
Hello,
I'm glad to anncounce that FPC now covers working with webassembly in the
browser.
Because pictures say more than a thousand words, 3 demos:
A modest "hello, world" variation:
https://www.freepascal.org/~michael/pas2js-demos/wasienv/simple/
A (limited) terminal emulation:
https://www.freepascal.org/~michael/pas2js-demos/wasienv/terminal/
And yes, we can do graphics too:
https://www.freepascal.org/~michael/pas2js-demos/wasienv/terminal/
In all 3 cases:
- The webassembly program was created with the FPC webassembly target.
- The hosting environment is created using pas2js.
This is just initial hosting support, there is lots of work to be done.
The webassembly compiler works very well, and is integrated in the compiler testsuite.
More info can be found in:
https://wiki.freepascal.org/WebAssembly/Compiler
https://wiki.freepascal.org/WebAssembly/Roadmap
Our little contribution to a Merry Christmas for everyone...
Michael.
More information about the Pas2js
mailing list