5 ms·
Obligatory jaw-dropping egui demo: https://www.egui.rs/#demo https://www.egui.rs/#demo Egui slaps and is clearly going places.
by echelon 4y ago
Obligatory jaw-dropping egui demo:
https://www.egui.rs/#demo https://www.egui.rs/#demo
Egui slaps and is clearly going places.
- tristanMatthias 4y agoGot this to crash by change the font size in the font book demo.
- vincnetas 4y agoTrying to copy/paste in safari also crashes the demo.
- Animats 4y ago"Loading..." I've run it before. I know what it looks like. I use egui. It's OK. But you have to code up all your dialog boxes in Rust. This is misery if you have fifty dialog boxes and widgets you need. The widget library is weak and the themes are poor. I don't care, because I'm doing a metaverse client, and all the visuals are in the 3D image. The 2D GUI on top is minimal, as is normal for games. So minimal that it disappears completely, like YouTube controls, when you're not using it, to give you a clean 3D world. (Egui hint: don't use bottom-up layout. Always work top-down, left to right. Egui layout is one pass, and while it tries to look ahead, it's not good at it.)
- potamic 4y agoIt's pretty lagging for me on a beefy machine with hardware acceleration enabled. What gives?
- flohofwoe 4y agoAre other WebGL demos also slow (e.g. check https://webglsamples.org/ https://webglsamples.org/)? How uptodate are your graphics drivers? In some rare cases WebGL is blacklisting old drivers if they have known vulnerabilities, and instead falls back to software rendering.
- bschwindHN 4y agoegui is nice for internal tools, and for quickly creating UIs for games and such, but I don't think I'd ever release a consumer-facing app with it. It has too many quirks compared to a more "native" UI that it can be quite awkward to use interfaces made with it. I'm talking about things like inertial scrolling, text selection, window resizing, etc. It's certainly nice to work with from a developer's perspective, what could be easier than if ui.button("Say hello").clicked() { println!("Hello!"); ] ? But it's quite a pain to style if you're particular about typography and pixel-perfect layouts. Between styling an egui app and styling something with CSS (or some flexbox/grid system), I'll take CSS every time. Still looking forward to how Xilem turns out, and what people build on top of that.
- echelon 4y agoFor this there's Leptos and a half dozen other "DOM in Rust" frontend frameworks: https://github.com/leptos-rs/leptos https://github.com/leptos-rs/leptos These are already orders of magnitude faster than React, and as the WASM<->DOM bridge improves, they will only get faster. Sycamore: https://github.com/sycamore-rs/sycamore https://github.com/sycamore-rs/sycamore https://sycamore-rs.netlify.app/examples/todomvc/# https://sycamore-rs.netlify.app/examples/todomvc/# Dioxus: https://dioxuslabs.com/ https://dioxuslabs.com/ In about 3-5 years these frameworks will start to consolidate and reach maturity. It's already possible to build reactive isomorphic apps in Rust. If you haven't checked out Actix/Axum, it feels a lot like Python/Flask. The ecosystem is coming along quickly.
- bschwindHN 4y agoYep, my current favorites are Axum and Dioxus for web things (and some desktop apps too).
- arethuza 4y agoThat looks awesome - are there any accessibility features (e.g. supporting screen-readers)?
- emilern 4y agoYes! egui uses https://github.com/AccessKit/accesskit https://github.com/AccessKit/accesskit for accessibility
- Kiro 4y agoAre you being sarcastic?
- galangalalgol 4y agoI certainly was extremely impressed the first time I saw it. Other than the font book I haven't found anything there that is slow. What makes you think the op might have been sarcastic? Egui was in a thread yesterday and it seems like canvas rendering is a dividing issue between people who value portability and performance most vs people who value consistency of ergonomics and style/look most.
- josephg 4y agoIts certainly controversial. Using canvas based rendering like this is essentially reverse-electron. Electron builds native software by embedding a web browser and using the browser's layout engine and DOM. Canvas based rendering like this is the inverse. Here the application discards the browser's layout engine and DOM, and instead embeds its own layout engine. - Despite the browser being right there and available. Hilariously, in a demo like this there's 3 layers of UI controls nested inside each other. First, there's the OS's native UI toolkit. Then there's the browser. The browser discards most of those UI elements, and reimplements its own controls. And then Egui discards all of that and embeds its own, third layout engine all written in wasm. No inertial scrolling. No web inspector. No native controls (especially a problem on iOS or android). No CSS - so I hope Egui's layout engine supports the layout you're after. Downside: Its a 5mb wasm bundle. But on the plus side, 5mb is positively tiny compared to shipping electron!
- jenadine 4y agoThe idea is that instead of shipping electron, you ship a native binary that use egui without using wasm or the canvas. Egui only use wasm in situations where you must use the user browser because you have no choice. Eg: showing a demo of the app on the web without having to install anything. > Its a 5mb wasm bundle. But on the plus side, 5mb is positively tiny compared to shipping electron This comparison makes no sense. Situation where electron could be used are exactly the kind of situations where a wasm bundle would not be shipped (a native binary would be shipped instead)
- deleted 4y ago[deleted]
- int_19h 4y agoThe first thing I noticed here is that the textbox doesn't have the usual context menu with commands like "Select all" and various IME features. It's not clear whether RTL and bidirectional capabilities are there, and if so, how to use them. Next I clicked on the combo box, it opens the dropdown, and I try to use arrow keys to navigate it. That doesn't work. Is that because I opened it using the mouse? Nope, still doesn't work if you tab through the widgets and use Enter to open. Looking up items by typing the first few characters doesn't work, either. This is all really basic stuff that native widgets offer to any app for free on any platform.