News for hackers. Stuff that matters.
Re:Dioxus 0.6 – Crossplatform apps with Rust by datadeft on Wednesday December 11, 2024 @10:54AM (#42389004)
Is Tauri and Dioxus similar projects, or those are made for different purposes?
Re:Dioxus 0.6 – Crossplatform apps with Rust by huevosabio on Wednesday December 11, 2024 @11:00AM (#42389078)
AFAIK, Tauri is an electron replacement: a portable web view container where you can use any web tech to build an app. So you can build with JS/TS or any language that compiles to WASM. You can use the Rust native host but you don't have to.

Dioxus is a full UI kit for Rust. They stick as close as possible to React and even have CSS and Html syntax. But, it's not a web environment.

Re:Dioxus 0.6 – Crossplatform apps with Rust by synergy20 on Wednesday December 11, 2024 @11:11AM (#42389234)
a quick read shows it tries to be 'flutter but in rust'
Re:Dioxus 0.6 – Crossplatform apps with Rust by 0x457 on Wednesday December 11, 2024 @01:18PM (#42390885)
Neither Tauri nor Dioxus is trying to be flutter. The only similarity is that those projects exists in GUI space.

Tauri is an electron alternative. It handles windows creation, rendering of web pages as well as IPC between frontend and backend.

Dioxus is a frontend framework similar to Next.js and other react-based frameworks.

Flutter uses an entirely different approach to GUI.

Re:Dioxus 0.6 – Crossplatform apps with Rust by anentropic on Thursday December 12, 2024 @07:25AM (#42398584)
The linked article literally states: Our goal is to build a "Flutter but better."
Re:Dioxus 0.6 – Crossplatform apps with Rust by jkelleyrtp on Thursday December 12, 2024 @02:38PM (#42402570)
I never know how to position Dioxus, so would be happy to have some 3rd party insight.

When I say we use a webview, people immediately jump to Tauri. But we're very architecturally different than Tauri. No WASM on native, just a regular old executable.

When I compare us to Flutter, people immediately think of Flutter's negatives (poor web support). We have excellent web support (DOM is 1st class).

When I compare us to React Native, people immediately think the web is 2nd-class and then wonder why we don't implement NSScrollView and all that.

We are shooting for something like Flutter (web, desktop, mobile, embedded) but where the web is the defining feature.

As someone outside Dioxus, how do you think I should describe it?

Re:Dioxus 0.6 – Crossplatform apps with Rust by anentropic on Friday December 13, 2024 @05:16AM (#42407390)
> We have excellent web support (DOM is 1st class)

ah I missed that... I read something about Flutter and WASM and kind of assumed it was rendering to canvas

that's very nice

Re:Dioxus 0.6 – Crossplatform apps with Rust by resoluteteeth on Wednesday December 11, 2024 @11:17AM (#42389314)
Edit: apparently the documentation indicating this was inaccurate -------- Original comment:

Dioxus appears to currently use Tauri for the desktop renderer (https://dioxuslabs.com/learn/0.6/guides/desktop/) so it seems like it's a cross-platform framework that uses tauri on the desktop.

However it seems like they to switch to their own html renderer for desktop at some point.

Re:Dioxus 0.6 – Crossplatform apps with Rust by jkelleyrtp on Wednesday December 11, 2024 @11:21AM (#42389351)
We don’t necessarily use Tauri… Tauri has a library called wry that’s basically a more maintained fork of the Rust web-view library.

https://github.com/Boscop/web-view

We are great friends with Tauri but I think people misunderstand our architecture and philosophy just because we use one of their maintained libraries.

We’ve been working on a native HTML/CSS library for a while called blitz which is reaching stability soon.

https://github.com/DioxusLabs/blitz

Re:Dioxus 0.6 – Crossplatform apps with Rust by resoluteteeth on Wednesday December 11, 2024 @11:29AM (#42389465)
I'm just going based off of the page I linked (which appears to be the documentation for version 0.6 which was just released) which says:

> Dioxus desktop is built off Tauri. Right now there are limited Dioxus abstractions over the menubar, event handling, etc. In some places you may need to leverage Tauri directly – through Wry and Tao.

Maybe that paragraph is out of date though?

From your comment it seems like wry is not (currently?) based on Tauri so it doesn't seem like it would make sense to "leverage Tauri directly – through Wry"; was wry previously based on Tauri and is that part left over from before that change? Or did the person who wrote the documentation misunderstand how it works?

Re:Dioxus 0.6 – Crossplatform apps with Rust by jkelleyrtp on Wednesday December 11, 2024 @11:33AM (#42389512)
Oh, my bad. That language has never been accurate and I'm not 100% sure why it's phrased that way. Just pushed an update.
Re:Dioxus 0.6 – Crossplatform apps with Rust by ezero on Wednesday December 11, 2024 @11:29AM (#42389459)
I'm guessing some of that misunderstanding comes from the fact that it states "Dioxus desktop is built off Tauri" here: https://dioxuslabs.com/learn/0.6/guides/desktop/
Re:Dioxus 0.6 – Crossplatform apps with Rust by jkelleyrtp on Wednesday December 11, 2024 @11:33AM (#42389520)
Oh, my bad. That language has never been accurate and I'm not 100% sure why it's phrased that way. Just pushed an update.
Re:Dioxus 0.6 – Crossplatform apps with Rust by jasonjmcghee on Wednesday December 11, 2024 @11:00AM (#42389090)
Different purposes- at least that's how it started / feels like it currently is.

A similar comparison would be Electron and React / React Native.

Tauri is a way to package a web app (e.g. could be react or svelte written in typescript) in a window and interface with rust code.

Dioxus is a way to write web apps (and other applications) in pure rust.

Re:Dioxus 0.6 – Crossplatform apps with Rust by airstrike on Wednesday December 11, 2024 @12:07PM (#42390001)
"Pure rust" is not quite accurate given the rsx! macro DSL stuff
Re:Dioxus 0.6 – Crossplatform apps with Rust by jasonjmcghee on Wednesday December 11, 2024 @12:58PM (#42390656)
sure it is. the macro is written in rust and used in rust and compiled using the rust compiler
Re:Dioxus 0.6 – Crossplatform apps with Rust by airstrike on Wednesday December 11, 2024 @01:06PM (#42390752)
the tooling might be in Rust, but now I have to write some new DSL that isn't Rust
Re:Dioxus 0.6 – Crossplatform apps with Rust by jkelleyrtp on Wednesday December 11, 2024 @01:38PM (#42391153)
The DSL is basically just Rust structs with optional fields. We essentially use the same struct parser rust uses but with some small tweaks.

You want to use a macro for this so you can do hot-reloading - doing it with native Rust is currently impractical for rapid dev.

Re:Dioxus 0.6 – Crossplatform apps with Rust by fl0id on Wednesday December 11, 2024 @11:07AM (#42389180)
how pure though if it's using react.
Re:Dioxus 0.6 – Crossplatform apps with Rust by jasonjmcghee on Wednesday December 11, 2024 @11:13AM (#42389248)
it isn't. it's "like react"