3 ms·
Wrote about that here in our readme: https://github.com/dioxusLabs/dioxus/?tab=readme-ov-file#dioxus-vs-tauri https://github.com/dioxusLabs/dioxus/?tab=readme-
by jkelleyrtp 3y ago
Wrote about that here in our readme:
https://github.com/dioxusLabs/dioxus/?tab=readme-ov-file#dioxus-vs-tauri https://github.com/dioxusLabs/dioxus/?tab=readme-ov-file#dio...
Tauri puts your frontend in the webview and you need to communicate with native Rust functions through an IPC boundary (like electron).
In Dioxus your Rust code lives on the native side, so you don't need IPC to do things like read from the file system, websockets, etc. Tauri also forces your frontend to compile to WASM, and a lot of interesting rust crates don't compile to wasm.
It's a little hard to express how much simpler it is to build when you don't have an IPC boundary. Dioxus' tooling is also dedicated to just Rust, so you can go from zero to bundled `.app` in less than a minute (12 seconds fresh build, 20 seconds fresh bundle).
That being said we're huge fans of Tauri and the flexibility it gives you (frontend in whatever web-compatible UI you want) and you can even use Dioxus in your Tauri apps!
- 01HNNWZ0MV43FF 3y agoI see what you mean, but to a reader unfamiliar with tauri this makes it sound really bad. Here's how I use tauri: Almost everything is native rust in the "backend" process, which is where main is. I don't need any ffi calls to write files, open ports, etc, it's a normal rust program that happens to have a web view. So I've never had a problem with compiling to wasm, the GUI is TypeScript and the business logic is aot rust The ipc boundary is annoying. It'll be faster in tauri 2, but in 1 it uses json or something internally, so you couldn't e.g. write a video player that uses a custom rust codec. Getting uncompressed video frames through ipc would kill perf I'll take a look how dioxus solves this
- jkelleyrtp 3y agoOne of this release's features is getting byte streams into the webview using custom protocols. It's not as ideal as say, sharing a GPU texture with the webview, but powerful enough to do video streaming and data viz.
- dceddia 3y ago> Tauri also forces your frontend to compile to WASM I’ve been using Tauri (1.x) for a couple years shipping a video editor and I don’t think this is true? I went searching to verify and I couldn’t find anything saying it complies to WASM (or at least not that it requires compiling to WASM). Can you point me to where you saw this?
- 01HNNWZ0MV43FF 3y agoWhoa. Video editor is exactly what I assumed Tauri couldn't reasonably do. (See sibling comment - I also haven't used wasm since my UI is all TS) How'd you get that working?
- dceddia 3y agoI initially ran into that issue too (sending frames over IPC was not gonna work!) so I create a native OS-specific overlay and draw on it with wgpu. The IPC layer has been a bit annoying and I'm looking forward to Tauri 2 where that'll get faster. I've worked around it for some stuff in the meantime by using a custom protocol and serializing stuff to binary.
- jkelleyrtp 3y agoIf you want to use a Rust frontend framework with Tauri you need to compile to wasm. You typically use svelte/vue/react etc as the frontend, or I guess you could attempt some sort of MPA approach with SSR. Here's a guide for using Yew with Tauri. Notice how you need to install wasm-bindgen and wasm-pack. https://dev.to/stevepryde/create-a-desktop-app-in-rust-using-tauri-and-yew-2bhe https://dev.to/stevepryde/create-a-desktop-app-in-rust-using...
- dceddia 3y agoOhh sorry, I misunderstood what you were saying there. I'm just using Svelte in TypeScript and running it in the browser so it doesn't need to do the WASM step.