Skip to content

Building neophyte for web and running it as WASM + WebGPU in web browsers #21

@ctsrc

Description

@ctsrc

Two of the the underlying libraries used for the GUI of neophyte, winit and wgpu, support compiling to WebAssembly and using WebGPU in the browser.

I imagine there would be some challenges with running neophyte in the browser still. In particular with how the neophyte GUI would communicate with neovim. Ideally there would be a wasm build of neovim that one could run right there inside of the browser process, so that no remote neovim process on a server has to be spun up or connected to, as that comes with its own set of challenges like limiting resources that users consume when running many neovim processes for many users and authentication and authorization and storing files for the user on the server and all that.

I tried to look for any existing WASM builds of neovim. I found a forum thread and a link from there to an in browser version:

But I don't think the person that made that open sourced their work to make that WASM build. The copy of neovim they have on their Github profile does not include any WASM work that I can immediately see, and they never specifically mentioned any Github repo for the WASM version in that original thread above.

Although it could also be that all or most of what is already needed for running neovim is already upstream in the source repo of neovim itself? (cc @naruaway if you are open to sharing any details about how you compiled neovim to WASM for your website?)

Another related thing I found was a piece of software that connects a locally running neovim from the computer of the user to their web browser.

That one works by having one plugin for neovim that the user installs on their machine, and one extension for Firefox that the user installs in their browser. That kind of setup seems interesting too, even if it limits a bit what one can do (because then for example you would not be able to use it on say an iPad, and you wouldn't be able to use it if you are using a different browser than Firefox on your computer either).

Either way, I'm interested to know in terms of neophyte itself:

  • Have there been any attempts at running neophyte in the browser?
  • Is this already supported by neophyte?
  • Are there any plans to support it in the future if this support is not yet there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions