holzschu / a-Shell-commands

shell commands, pre-compiled to webAssembly, ready to use in a-Shell
554 stars 21 forks source link

Is it possible to compile emacs to WASM? #3

Open algal opened 3 years ago

algal commented 3 years ago

Not an issue, but a question: is it possible to compile emacs to WASM?

Sorry if this is lazy to ask but I don't know the first thing about the likely pain points in porting a codebase which is complicated, but supposedly already portable over many operator systems.

holzschu commented 3 years ago

Hi, the biggest limitation of WASM, currently, is the lack of interactive user input. Which, for an editor, is a strong limitation...

It is probably connected to the fact that wasm execution is done by the same WkWebView that is also in charge of user interaction. Separating the two jobs could help (I'm not sure, though). I see two possibilities: have a different WASM interpreter for interactive commands (wasmer works well, it is just not as fast as Apple's JIT compiler) or have a different method for user interaction (but then we still need to have a WkWebView on screen, so it can execute WASM).