←back to thread

217 points varbhat | 2 comments | | HN request time: 0.42s | source
Show context
jkelleyrtp ◴[] No.44371543[source]
Creator here - haven't had a chance to write up a blog post yet! Stay tuned.

The gist of it is that we intercept the Rust linking phase and then drive `rustc` manually. There's some diffing logic that compares assembly between compiles and then a linking phase where we patch symbols against the running process. Works across macOS, Windows, Linux, iOS, Android, and WASM. On my m4 I can get 130ms compile-patch times, quite wicked stuff.

We handle the hard parts that the traditional dylib-reloading doesn't including TLS, statics, constructors, etc.

I've been posting demos of it to our twitter page (yes twitter, sorry...)

- With bevy: https://x.com/dioxuslabs/status/1924762773734511035

- On iOS: https://x.com/dioxuslabs/status/1920184030173278608

- Frontend + backend (axum): https://x.com/dioxuslabs/status/1913353712552251860

- Ratatui (tui apps): https://x.com/dioxuslabs/status/1899539430173786505

Our unfinished release notes are here:

https://github.com/DioxusLabs/dioxus/releases/tag/v0.7.0-alp...

More details to come!

replies(5): >>44372393 #>>44373080 #>>44374315 #>>44374673 #>>44374679 #
1oooqooq ◴[] No.44372393[source]
can't access the xitter posts... is the axum part using the whole of dioxus or bare axum + code reloading?
replies(1): >>44372460 #
1. jkelleyrtp ◴[] No.44372460[source]
There's a custom `axum::serve` equivalent we built that wraps the router construction in a hot-patchable function. When the patches are loaded, we reset the TCP connections.

It's a little specific to how dioxus uses axum today, but we plan to release an axum-only integration in the future.

replies(1): >>44376002 #
2. 1oooqooq ◴[] No.44376002[source]
awesome. thanks. i will definitely follow the project and hopefully participate. lack of hot reload for the FE folks is the biggest blocker we get from other options.