Crates.io | egui_web |
lib.rs | egui_web |
version | 0.17.0 |
source | src |
created_at | 2020-08-09 15:39:49.347436 |
updated_at | 2022-02-22 18:37:01.897334 |
description | Bindings for compiling egui code to WASM for a web page |
homepage | https://github.com/emilk/egui/tree/master/egui_web |
repository | https://github.com/emilk/egui/tree/master/egui_web |
max_upload_size | |
id | 274668 |
size | 122,145 |
This crates allows you to compile GUI code written with egui to WASM to run on a web page.
Run the web demo to try it now.
Check out eframe_template for an example of how to set it up.
egui_web
uses WebGL and WASM, and almost nothing else from the web tech stack. This has some benefits, but also produces some challanges and serious downsides.
egui_web
fakes it by adding some invisible DOM elements. It doesn't always work.egui_web
, but it has to be enabled explicitly. There is no JS function to ask "Does the user want a screen reader?" (and there should probably not be such a function, due to user tracking/integrity conserns).In many ways, egui_web
is trying to make the browser do something it wasn't designed to do (though there are many things browser vendors could do to improve how well libraries like egui work).
The suggested use for egui_web
are for web apps where performance and responsiveness are more important than accessability and mobile text editing.