Better HN
topnewbestaskshowjobs
Log inSign up

demonthos

19 karma · joined Dec 26, 2022 (3y ago) · 13 submissions

Submissions

1.

Betlang – A programming language detection model in 50kb(github.com ↗)

3 points · by demonthos · 4mo ago · discuss

2.

Betlang: A tiny (50kb) programming language detection model(github.com ↗)

3 points · by demonthos · 6mo ago · discuss

comment 3y ago · link · parent

DOM mutations still happen in JS, they are just send from native-rust code. It is exactly like a liveview with a local server + webview wrapper

comment 3y ago · link · parent

You can use rust's feature flags with one flag per renderer to specialize based on the renderer

comment 3y ago · link · parent

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

comment 3y ago · link · parent

Widgets are currently not implemented, but we plan to integrate with access kit to provide accessibility for applications built with Blitz

comment 3y ago · link · parent

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)

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

Building an application that works with TUI, web, and desktop is possible but there are some differences you need to keep in mind. The TUI renderer has a different scaling factor than the web renderer. One pixel is one character and Widgets have start with a capital letter with the web renderer, but for the attribute and elements that the TUI renderer supports the goal is to behave as close to possible to the web implementation. There are some differences that will likely remain because of the differences of the terminal platform, but we would like to continue working on minimizing these differences in the future.

comment 3y ago · link · parent

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