4 ms·
Just in case, Rust integration of Sciter is even easier: extern crate sciter; fn main() { let mut frame = sciter::Window::new(); frame.load_
by c-smile 10y ago
Just in case, Rust integration of Sciter is even easier:
extern crate sciter;
fn main() {
let mut frame = sciter::Window::new();
frame.load_file("minimal.htm");
frame.run_app();
}
Result: https://camo.githubusercontent.com/b7d9438384930801ba15d027d42ca23441924dae/687474703a2f2f692e696d6775722e636f6d2f6f6a634d354a4a2e706e67 https://camo.githubusercontent.com/b7d9438384930801ba15d027d...
Rust/Sciter integration:
https://github.com/sciter-sdk/rust-sciter https://github.com/sciter-sdk/rust-sciter
- IshKebab 10y agoYeah but I feel like HTML GUIs are the antithesis of Rust. Granted, it may be the best option at the moment.
- c-smile 10y agoWhy is it an antithesis? HTML UI at the end is just a set of few simple concepts (at least with Sciter): 1. UI is a composition of just two universal components: Element and Node (text, comment, etc). 2. UI is a single rooted tree of such blocks - DOM tree. 3. The tree can be styled by well known CSS means. 4. Events are delivered to particular UI elements using bubbling/sinking event propagation schema. 5. Any DOM Element may have so called behavior assigned to it. The behavior is either native (C/C++/Rust/Go/etc) or script function. All <input> elements are normal DOM elements with corresponding behaviors attached. I do not see how this simple setup can be an antithesis to anything.
- IshKebab 10y agoBecause Rust is all about efficiency and doing things 'the right way'. HTML is one massive hack at this point and one that wasn't even designed for making desktop GUIs. It's also really slow compared to true GUIs. Remember Firefox OS? Yeah.