Any pure Rust minimal editor that runs on wasm32?

https://github.com/raphamorim/rio/tree/main/sugarloaf is enough for text rendering.

With or without rendering sugarloaf, is there any pure-Rust (node codemirror bindings, not monaco bindings) editor that runs on wasm32 ?

I'm looking for a minimal editor that (1) can run in Chrome and (2) I can hack on in Rust.

Thanks!

Note: Looked at Helix before, can't get it to build on wasm32.

1 Like

Makepad's code editor maybe? I'm not sure if the code editor itself supports compiling to wasm, but several examples using the Makepad framework do.

GitHub - makepad/makepad: Makepad is a creative software development platform for Rust that compiles to wasm/webGL, osx/metal, windows/dx11 linux/opengl (note the linked https://makepad.dev seems to be running a pretty old version.)

1 Like

I've run makepad on wasm before in the past. The problem however, is it is all-or-nothing for the entire IDE. I.e. it takes over the WebGL2 rendering context, has its own 'IDE', does its own font rasterization, etc ... Unless they recently changed something, I'm not sure if the 'editor' component can be used independently

Hey, I'm building ultron-editor. It's still a work-in-progress and there is a lot of stuff that is not working properly. You can try out the demo.

I build it primarily for my other high-level project bob-editor which has some odd requirements that I thought using an existing javascript base editor would be a lot of headache, that's why I built the editor from scratch and purely in rust. Additionally, it is built on top of my sauron web framework, which has benefit a lot of improvement since I started writing applications like the editors and such.

1 Like
  1. Thank you for sharing.

  2. This is more than I have done, so none of the following is meant to be dismissive / critical.

  3. By your own webapp report, I'm getting 50ms-100ms delays in the ultron-editor demo. The bob-editor demo also feels laggy. Is this something wrong with my local system, or is dom based editors inherently laggy? [ codemirror / monaco feels snappier ]

I noticed that the demo are outdated, I just updated the demo now. There is also beta and alpha version where I deploy most often than the main demo.

Thanks for reporting it's sluggish. Though I've put several improvements from the past, I realized this is still slow for other users. It has gone from 180ms(2021) -> 80ms(2022) -> 15ms(recently), but there are still improvement I could do on both the underlying framework and in the editor.

I'm seeing a 15ms on my laptop, YMMV.
AMD® Ryzen 5 5600h with radeon graphics, Ubuntu 22.04.3 LTS

Also, most development is done on the develop branch of the code, where it uses a local ../sauron repo. In case, you will need to hackout the editor, you will need a local sauron repo.