[Pas2js] WebAssembly support for DOM access
Jy V
jyv110 at gmail.com
Fri May 3 09:36:34 CEST 2024
Good morning Michael,
I have received your article as a PDF,
thank you,
I was aware of your *JOB* since your email of September 4th 2022,
I always like to get news on the progress of WebAssembly.
Kind regards, Jerome.
On Sun, Sep 4, 2022 at 11:40 AM Michael Van Canneyt <michael at freepascal.org>
wrote:
>
> Hello,
>
> Thanks to the sponsoring by Tixeo, the FPC & Lazarus team has developed a
> pretty unique feature for the FPC WebAssembly support.
>
> Webassembly is a bytecode format and embedding specification that allows
> you
> to load and run compiled code into the browser in a restricted
> environment.
> It is supported by all major browsers.
>
> You can also run webassembly bytecode in command-line tools such as
> wasmtime
> or even in an FPC program, using the wasmtime library.
>
> By itself, WebAssembly has no access to its environment. It can only use
> what the environment provides: file access, DOM acces etc. If the
> environment defines it, WebAssembly can use it. The webassembly
> specification only defines a mechanism to import/export routines from/to
> the
> environment in which it runs.
>
> The browser has a rich environment, which it does not (yet) expose to the
> WebAssembly world. Which is a pity, because this limits the usefulness of
> WebAssembly in the browser considerably.
>
> FPC has now developed a protocol which allows you to use all Browser APIs
> by
> the JOB (Javascript Object Bridge) mechanism, in particular the DOM
> functionality.
>
> This allows you to build a UI (using HTML) for webassembly programs
> running in the browser: one can imagine running Lazarus in the browser...
>
> More info about this unique feature can be found in the Wiki:
>
> https://wiki.freepascal.org/WebAssembly/DOM
>
> To my knowledge, the only other programming language to offer this kind of
> general support for browser API access from webassembly is Rust.
>
> Enjoy,
>
> Michael.
> _______________________________________________
> Pas2js maillist - Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20240503/aebb9341/attachment.htm>
More information about the Pas2js
mailing list