[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] TeXmacs & Webassembly

From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] TeXmacs & Webassembly
Date: Mon, 31 Jan 2022 09:45:51 +0100


> On 29. Jan 2022, at 18:57, Hammer Functor <hammer401@foxmail.com> wrote:
> Hi Max,
> Maybe it’s possible to access local files systems with the help of wasi 
> (webassembly system call). I know little technical details, but I do heard of 
> something about it last year. Native wasm runtimes like wasmtime and wasmer 
> are promising as well, which helps to run wasm programs without a browser, 
> though qt-wasm are tied to browsers at present. 

my understanding is that the environment provided by a web browser is naturally 
constrained by design, so WASI which is an API, will not improve the situation. 
There is the possibility to persist some data in the browser by using the 
database facilities of HTML5. This seems easy to do, we have to mount a virtual 
filesystem visible from TeXmacs which connect to the DB, I will look into it. 
However to "spill" files in the native OS one need to download it from the 
browser to the native OS like one would download a file from a website. The 
same applies for printing. Think about how Google Docs works, it has the same 
limitations we experience. I do not think it is bad, we have to keep in mind 
that TeXmacs/web would anyway have restrictions which the TeXmacs desktop app 
would not have, e.g.: no direct access to the filesystem (including fonts, 
etc..), resources to be downloaded from the web, no possibility to run plugins, 

A different situation would be to run TeXmacs/webassembly inside node.js or any 
other wasm capable runtime which is not a browser and which could then 
implement indeed the WASI api and allow filesystem access. This is already 
possible and would allow to develop TeXmacs in a really cross-platform fashion 
in webasm and then provide a small substrate to interface to any given OS. This 
about applications like Whataspp desktop, Electron, Visual Studio Code. For 
this to be interesting for us we need to understand what is exaclty the 
performance penalty of compiling to webasm instead of native machine code. 


> Hope it help. 
> Sincerely,
> Hammer Hu
> _______________________________________________
> Texmacs-dev mailing list
> Texmacs-dev@gnu.org
> https://lists.gnu.org/mailman/listinfo/texmacs-dev

reply via email to

[Prev in Thread] Current Thread [Next in Thread]