3 ms·
That's exactly the rabbit hole I'm in. I love immediate feedback but getting it ranges from hard to neigh impossible. E.g. I have a complex Emacs setup for ren
by xlii 4y ago
That's exactly the rabbit hole I'm in.
I love immediate feedback but getting it ranges from hard to neigh impossible. E.g. I have a complex Emacs setup for rendering Pikchr diagrams, but there are a lot of problems to solve from diagram conception to the end result, so I thought, hey, why not make my own cool RT editor - in Rust obviously.
Unfortunately I learned that GUIs are though problem especially if idea is hobby-based so there's only one developer inside. Ultra responsive GUIs cool, I have a prototype in egui (not sure if that's as fast as Zed's premise but feels fast nonetheless) and yet it doesn't support multiple windows, which I wanted to have.
120 FPS with direct rendering sounds AWESOME just for sake of it, but I believe that for the end-user layout will be more important than refresh rate, and that's different beast to tame.
Personally I "almost" settled for Dioxus (shameless plug: [1], there's link to YT video) and I'm quite happy with it. Having editor in WebView feels really quirky though (e.g. no textareas, I'm intercepting key events and rendering in div glyph-by-glyph directly).
[1]: https://github.com/exlee/dioxus-editor https://github.com/exlee/dioxus-editor
- as-cii 4y agoHey xlii! This is Antonio, author of the post. You're right that rendering is only part of the story. To stay within the ~8ms frame budget, however, every little bit counts. Maintaining application state, layout, painting, and finally pushing pixels to screen, all need to be as performant as they can be. For layout specifically we're using an approach inspired by Flutter, which lets us avoid complex algorithms but still have a lot of flexibility in the way elements can be positioned and produce a rich graphical experience. Thanks for reading and commenting!
- xlii 4y agoI don't have experience with Flutter, but based on quick glance they're using widgeting and, what I found quite important - ability to develop GUI outside of the application. Something that I think libraries like egui are missing (and which is easily obtainable with Tauri/Dioxus). Rebuilding whole app to ensure that some box doesn't get cut off ruins development experience, especially for big apps. Kudos to you guys, I hope you'll make Zed extensible, so that instead of writing my own editor I can use yours ;-)