emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
22.14k stars 1.6k forks source link

Run Time Compilation #1705

Open thomas992 opened 2 years ago

thomas992 commented 2 years ago

I think that EGUI needs to have rhai embedded scripting. Debugging with a console, being able to reload files would speed up development time and make a web developer friendly experience. EGUI could be written in EGUI. Would like to know what other people think before continuing.

coderedart commented 2 years ago

I doubt we will have official bindings . Whatever solutions we want should be third party.

I already did a small proof of concept once, the main issue was how to deal with lifetimes like Window<'open>, and api which take mutable references ike checkbox bool or text edit strings.

I have moved on to lua for the popularity of the language and speed of luajit. But ofcourse, no wasm for lua yet

thomas992 commented 2 years ago

Found your code for rhai_egui, I am having trouble compiling it. After updating the Rhai version from 1 to 1.7 and egui, eframe, I have several compile problems. Will start a new project and use yours as a reference thank you. WASM is better than HTML, Rhai works for Web design and game development.

coderedart commented 2 years ago

did you make any progress btw? looking for any safe made in rust, for rust language bindings of egui.

i just updated my repo to work online too, so its just a matter of figuring out how to make the bindings as safe as possible. https://coderedart.github.io/rhai_egui/

thomas992 commented 2 years ago

I have not. You certainly have though it looks amazing. I am going to convert ABOKADO, a Japanese language learning example. I name tech stuff after foreign fruit. http://abokado.herokuapp.com/ I will probably have a repository up in a few days. I am feeling real hype about this one, so I am going to call it Ringo a Japanese apple.