Brian Lovin
/
Hacker News
Daily Digest email

Get the top HN stories in your inbox every day.

jkelleyrtp

Creator here - ask away! We added a bunch of new features to master that haven’t been released yet, like liveview, WGPU renderer, instant hot reloading, autoformatting, and more.

neilv

What's the maturity of Dioxus right now, and what's the roadmap for that with rough dates?

After flipping through the different target platform info, looks like the front page claims are partly aspirational, not currently implemented or integrated.

(Reason I ask: Coincidentally, I'm just starting a new TUI project with Cursive tonight, but looked at Dioxus when I saw it on HN, because I'd love to not have to keep relearning different UI toolkit bureaucracies, for also doing Android&iOS, Web, and Linux desktop. But I've seen countless cross-platform GUI toolkit efforts over the decades, and unclear how mature Dioxus is going to become.)

demonthos

Dioxus is still pre-1.0. We will try to minimize unnecessary changes, but there will be breaking changes between 0.x releases. This allows us to keep iterating to find the best approach. If you are willing to brave some breaking changes and bugs, try Dioxus. If you want a mature framework you might want to choose another project. I don't know of many mature rust frameworks but there are many more mature Javascript frameworks to choose from.

Here is a rough roadmap: https://github.com/DioxusLabs/dioxus/blob/master/docs/guide/...

The major projects for the next year are to improving the native render (Blitz), the full stack framework (Tokamak), Router, and subtree rendering.

neilv

Thank you. That platform status might be moved to the home page, and also updated (e.g., to add TUI, clarify the state of Android, clarify when it relies on a partner project, etc.).

I hope this Dioxus is very successful, since I'd love to be doing all this work in Rust.

aliswe

why not break the 0 and do major releases whenever you break something?

rsp1984

Maybe it's because I'm not very experienced with web development but I have a hard time wrapping my head around this and unfortunately the tutorials didn't enlighten me either.

How is this used on a very high level? Is this a pure front-end framework? So, let's say I write an app using Dioxus. Then the input are .rs files but what is the output? For desktops: an executable? For web: a folder with HTML/JS/CSS?

And how does this work under the hood? Is it drawing all UI elements from scratch using Canvas/WebGL? Or is it more like a translator that fills a regular DOM at runtime and uses that for rendering?

jkelleyrtp

Dioxus is HTML native so it speaks in native HTML elements to solve the flutter problem.

It’s written in Rust so it doesn’t need a JS engine which gives it this huge portability. Your intuition on the outputs is correct. For the web, you get a folder of HTML, CSS, and the tiniest amount of bootstrapping JavaScript. For most other platforms you get a small binary that is self contained.

pieresqi

Hi, home site doesn't run without enabled js jit. Are there any plans to not rely on jit or that's not possible ? Or it's caused by 3rd party plugins ?

demonthos

The homepage is built with Dioxus so it uses Javascript and WASM right now. Dioxus does support ssr (https://docs.rs/dioxus-ssr/latest/dioxus_ssr/) which could be an option to support better progressive enhancement in the future

CJefferson

How is the accessibility? I can't find it mentioned anywhere on your pages.

jkelleyrtp

It uses HTML as the base so accessibility is built right in. As we stray into more custom solutions, then we’ll use accessibility kit, but since in the short term it’s all rendered straight to the DOM, we get it for free.

vorpalhex

How's support for older systems? Will apps run nicely on older 32bit systems or older windows versions? What does the platform testing look like?

demonthos

Dioxus desktop uses Wry (one of the libraries Tauri is built on) which requires WebView2 on windows. You can install this on windows 7 or include a bootstraper. All windows versions after 7 have WebView2 pre-installed. In theory, 32 bit machines should work out of the box although I haven't tested it.

Dioxus runs its test suite on modern versions of windows, macOS and linux

rajangdavis

What’s the story surrounding cross platform MIDI support? I don’t expect it to be a priority but it’s something that I was looking into with Flutter/Dart, it would be killer to have.

demonthos

For Dioxus web and desktop (webview), we provide a use_eval hook to execute Javascript that should allow you to use interface with MIDI

ilaksh

I pressed the play button the the first example on the guide page and it gave an error about a missing macro.

jkelleyrtp

The rust docs don’t run UI libraries with any helpful output.

ipnon

What do you think the main challenges are with implementing LiveView? How do you think it will ultimately compare to Phoenix for web apps, and more generally? It looks like a good project!

lilyball

This sounds neat, but something sorely missing from this page is ahh mention of accessibility. Does Dioxus integrate with the platform-native accessibility APIs?

robin_reala

Honestly, full AT tree support is minimum table stakes at this point. If a toolkit’s documentation doesn’t say how that support is of course there because they started with it in mind, then it’s an automatic skip for anyone building production systems that are expected to be live in the US, Canada, Israel, Australia, Norway, the EU (in 2025), etc etc.

jkelleyrtp

Dioxus renders HTML. Right now using WebKit, but in the future, its own engine with the same accessibility libraries that power the platform’s accessibility with the layer to get from HTML.

jkelleyrtp

It uses web tech so all the accessibility is built right in!

irskep

"Web tech" could mean WebGL or Canvas, which are not accessible. Does it create HTML elements?

I'd check myself, but none of your examples seem to be available to just look at without cloning the repo locally.

jkelleyrtp

If you dig into the library a bit more you’ll find that it renders native HTML elements.

franga2000

That doesn't mean much on its own. 30 nested <div>s with auto-generated IDs and all input handled in JS also counts as "web tech", but I wouldn't want to subject any screen reader user to that.

littlestymaar

In another comment you mentioned some ongoing work on a native back-end, how is the accessibility story going in this scenario?

jkelleyrtp

We’re leveraging the work done by Druid so the plan is to use AccessibilityKit as the foundation. Our native renderer is essentially a GPU-accelerated HTML/CSS renderer so we’ll pull in all the accessibility tech there. We don’t want people to learn anything new to get started, so sticking with web foundations is smart even if it’s not as great as a bespoke solution.

cuu508

There are webview mentions, so I assume the user interfaces are built with HTML and CSS? Do the apps bundle the renderer (like Electron or Sciter) or use the OS webview (like Cordova)?

nicoburns

Dioxus is kind of like React - it's renderer-agnostic. It has a browser renderer, one based on Tauri (OS webviews), a TUI renderer, and a native renderer (wgpu) is planned.

rhodysurf

It provides mobile and desktop via tauri. It’s just a web framework

agency

And IIRC Tauri defaults to using the OS webview so you can ship very small binaries.

codethief

…at the cost of running into annoying and hard-to-reproduce bugs because not all WebViews are created equal. (Safari WebViews, I'm looking at you!)

nicative

Isnt Yew (https://yew.rs/) similar in regard of the react like way to update the html document? I understood that Dioxus goes beyond and is the whole platform to run the app by including a webview, but wouldnt make sense to have another framework like yew as dependency to manipulate a "Virtual Dom"?

demonthos

Dioxus uses the virtual DOM as the core that allows rendering to many different platforms. Yew and Dioxus are somewhat similar but Dioxus represents it's virtual DOM very differently internally. Because of the way Dioxus' virtual DOM is made unlike Yew, Dioxus will never diff the static parts of a component (read more here https://dioxuslabs.com/blog/templates-diffing)

satvikpendem

Is this like Flutter? I see they say you can use a WGPU based renderer but it seems like the desktop and mobile apps are still akin to using a webview which isn't a great user experience.

demonthos

Right now Dioxus uses webview for all platforms except TUI and blitz.

Why? Choosing to use a webview renderer initially allows us to support many platforms quickly with fully featured renderer and accessibility built in. Comparing to Flutter targeting a web based model also allows our web renderer to render using elements instead of a canvas, and has a much smaller bundle size.

Dioxus is render agnostic and the plan for the future is to invest more time into blitz (our native renderer). This will allow us to achieve native performance on desktop and mobile.

satvikpendem

Makes sense, thanks. What do you mean by native renderer, is it like React Native where Dioxus calls are transformed into native system UI calls but keeps a JS bridge (which can sometimes be slow), or like Flutter which draws every pixel on a custom canvas but which is able to be compiled to machine code?

demonthos

More like flutter. Your code is compiled to machine code. It uses wgpu to render to desktop and mobile naively

bmitc

Is the LiveView reference referring to integration with Elixir's LiveView or is it just a poorly chosen name for some Rust thing?

On desktop, does it support multiple windows? I can't find any information. I'm generally not a fan of multi-target UI platforms, as desktop is almost always de-prioritized compared to mobile and web.

jkelleyrtp

LiveView here describes the approach, not the integration with phoenix. Multi-window support is coming. You can hack it together today, but we’re actively upgrading the core architecture to support multiple renderers per UI tree for declarative multi-window setups.

jacoblambda

> Is the LiveView reference referring to integration with Elixir's LiveView or is it just a poorly chosen name for some Rust thing?

Looking at the docs, LiveView is referred to as Server Side Rendering so I'm guessing yes

bmitc

I read that. LiveView is a specific Elixir package and solution. Is LiveView synonymous with server-side rendering, independent of Elixir?

jacoblambda

I haven't seen it used that way outside of the elixir space but I suppose it could be catching on in some dev spheres.

pimlottc

Sounds interesting, but where are there some basic screenshots of what it looks like on various UI platforms? The screenshots on the homepage all link to sample app repos which (at best) just have a single screenshot of the app running on a single platform.

jkelleyrtp

It renders HTML and CSS. It looks like what HTML would look like.

undefined

[deleted]

pomatic

Runs anywhere... except embedded platforms? (And no, android doesn't count so far as embedded platforms are concerned).

IshKebab

Weird nitpick. There are almost no GUI toolkits that run everywhere, including embedded systems (i.e. microcontrollers). The only one I know of is Slint.

fake-name

Then maybe they shouldn't claim it runs anywhere.

It's not a nitpick to point out that the explicit claim of running everywhere is horseshit.

0x6c6f6c

Doesn't run on my fridge? Liars.

mike256

Also <2mb doesn't really seem lightweight to me...

jkelleyrtp

You can get down to less than 60k. It’s just the average binary that links in various system resources with no size optimizations comes out at around 1.5mb. Tiny for desktop!

yazzku

For a web-based UI, if it manages to stay in the single-digit range I'd call that acceptable for all the functionality that you get in return. And I say this being skeptical of anything web-based in general.

h4x0rr

If it runs in a webview it ain't lightweight

needz

Was this website written in it? It’s awful on mobile. :/

0x6c6f6c

Surprisingly no issues here in Firefox or Chrome mobile. What's wrong with it?

danhau

Maybe the code editors could use some horizontal padding, otherwise it looks just fine on iOS.

jspaetzel

First impression, the landing page renders quite wrong on my phone. Viewport is too wide and I'm able to scroll left/right. Got some work to do on the running anywhere part I guess. Or maybe that's just the landing page. Either way there's work to be done somewhere.

tomcam

Nearing the end of a deadline so can’t explore too much, but this work looks comprehensive in scope. Lots of docs already, tons of complete examples. Can’t wait to learn more. Not a Rust guy but loving the examples.

thoughtpalette

Am I crazy? I went to built a TODO app and almost 70% of the docs are blank pages. Anything "Advanced Guides" and onward.

thoughtpalette

Just for posterity, the documentation was updated and looks to be complete.

082349872349872

Dioxus doesn't exactly manage anywhere yet, but it would be cool if it eventually included things like rendering to phone response tree: push 1 for X, 2 for Y...

Daily Digest email

Get the top HN stories in your inbox every day.