Fullstack GUI library for web, desktop, mobile, and more. In Rust using a HTML + CSS renderer built on top of Servo.

17 points

I seriously doubt that a dual-language platform is ever going to supplant Electron. Electron has the major advantage that the entire app is written in one language. And according to Stack Overflow’s 2023 developer survey, 66% of devs use JavaScript, 45% use Python, 43% use TypeScript, and 12% use Rust. More devs use Java, C#, C++, PHP, and C than Rust. So 2/3 of developers wouldn’t have to learn a new language to use Electron, and only a small fraction of the remainder knows Rust.

permalink
report
reply
9 points

I think this is a bit of a backwards way to look at it. If there is a good reason to learn a language then people will.

Not that this platform is necessarily that reason.

permalink
report
parent
reply
2 points

It’s not just about learning a language. Given two equivalent languages, writing a project using one or the other is always going to be less work and less of a maintenance burden than writing it using both. A competent manager will take that into account when deciding what tools to use. On top of that, learning a new language has a cost. Of course Rust and JavaScript are not equivalent, but which one is ‘better’ is highly subjective and dependent on how you measure ‘better’. So a manager needs to take that into account. But my fundamental point is that using two languages for a project adds overhead, and learning a language adds overhead, so unless cost (including time) is irrelevant, there must be a compelling reason to choose a dual-language solution* over a single-language solution, and to chose a solution that requires your devs to learn a new language over one that does not. Not to mention switching platforms has a massive cost if your project is already mature. Even if you’re creating a new project, if your team already knows JavaScript and doesn’t have any particular objection to Electron, there’s no compelling reason.

If there is a good reason to learn a language then people will.

Sure. Except in my experience interviewing candidates and from what I’ve seen online, there are a lot of developers out there who aren’t very good. I am not optimistic that the average developer will have an easy time learning a new language. If the “we” in “Is this the electron alternative we’ve been waiting for” is you and I, that’s not a problem. But if OP meant to suggest there will be a large-scale shift away from Electron, then the average developer is quite relevant.

*As someone else pointed out, Dioxus is designed with the intent that you’ll right the frontend in Rust, so it’s not exactly dual-language like I thought.

permalink
report
parent
reply
10 points

It’s not a dual-language platform, though. You write the backend and the frontend in Rust. The frontend code is compiled to WASM to serve it to the browser.

permalink
report
parent
reply
1 point

Ah, well that’s great for folks who already know or want to learn Rust

permalink
report
parent
reply
4 points

The folks who only know JavaScript and refuse to learn more deserve to be blamed for electron’s (and similar) continued existence, and therefore for excessive resource usage.

permalink
report
parent
reply
2 points

Nah I ain’t about that rust life

cgi on the other hand… 😍😍😍

permalink
report
reply
0 points

server side rendering only?

…what is WRONG with you

permalink
report
parent
reply
8 points
*

Tauri is the electron alternative we already have. This does look like a good framework, just not the same as electron.

permalink
report
reply
20 points

IMO, I’d say Dioxus is more of a portable front end framework. If you’re looking for an electron alternative i.e, something to run web applications like they are native apps, I’d recommend Tauri.

Also, this might be a bit out of date, but I believe Dioxus is using Tauri’s stuff under the hood. Although I heard this before the dev went full time on Dioxus, it could’ve changed, I know they have done a lot of work on it.

permalink
report
reply
4 points

Awesome, I’m looking for frameworks like this, thanks for sharing.

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 2.2K

    Monthly active users

  • 979

    Posts

  • 8.8K

    Comments