[Pas2js] ZenFS added

Jy V jyv110 at gmail.com
Tue May 21 18:03:06 CEST 2024


Well done Michael,

This is an important milestone,
demonstrating the well-designed architecture of FreePascal to support Wasi,

I was wondering if you are thinking of any limitation using Wasi backend as
WebStorage similar to your BrowserApp but when targeting Pas2JS Service
Worker App ?

Kind Regards, Jyv.




On Tue, May 21, 2024 at 2:42 PM Michael Van Canneyt via Pas2js <
pas2js at lists.freepascal.org> wrote:

>
> Hello,
>
> I've added an import unit for the ZenFS filesystem emulation in PasJS
> (packages/zenfs). There is a demo for it in demo (demo/zenfs).
>
> More importantly, for those interested in WebAssembly, it is used to
> implement a storage backend for WASI file support needed by a
> WebAssembly module. This was hitherto unimplemented.
>
> So now, if you use pas2js to load a webassembly, you can furnish your
> webassembly with a virtual filesystem in the browser.
> There is a demo for this as well (demo/wasienv/filesystem/)
>
> You can see it at work here:
>
> https://www.freepascal.org/~michael/pas2js-demos/wasienv/filesystem/
>
> and here:
>
> https://www.freepascal.org/~michael/fresnel/basic/
>
> (The webassembly code displays an image. It loads the image from a PNG
> file...)
>
> I plan to use the same backend to make the file routines in the units
> SysUtils, Classes and
> IOUtils for pas2js functional.
>
> 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/20240521/205d64af/attachment.htm>


More information about the Pas2js mailing list