this post was submitted on 12 Dec 2023
939 points (98.8% liked)

Programmer Humor

32479 readers
233 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 135 points 11 months ago (20 children)

A pile of HTML + JS is the only cross platform GUI toolkit that's practical to deploy.

I'm not really happy about it myself, but realistically there's not any other option than just bundling a website into a wrapper.

And to pre-empt any replies; your proposed solution must support Windows, Linux (X11 and Wayland), MacOS, iPhone, Android, Chromium and Firefox.

[–] [email protected] 6 points 11 months ago (2 children)

Chromium and Firefox are web browsers, of course they only support HTML+JS. That’s what they were designed for.

[–] [email protected] 10 points 11 months ago* (last edited 11 months ago) (1 children)

of course they only support HTML+JS.

WebAssembly is becoming more popular, which lets you run code written in languages other than JavaScript in a browser. It's not possible to do everything yet, so you still need some JS code and a bridge between the WASM and JS, but it's getting there. Emulators that run in the browser often use it.

[–] [email protected] 4 points 11 months ago

I don't think, there's currently any plans to introduce a non-JS API for accessing the DOM. It would just take an insane amount of implementation work + documentation.

But frameworks can generate access code for you, so you don't actually need to write any JS yourself. Rust is quite far ahead in this regard, thanks to the wasm-bindgen library.

load more comments (17 replies)