News for hackers. Stuff that matters.
Re:Emerging Rust GUI libraries in a WASM world by ljsb on Thursday April 27, 2023 @06:46AM (#35726101)
I hope it's OK to add a shameless plug for my Rust WASM framework, Silkenweb [0]. It's similar to Leptos and Sycamore in that it's signals based, but I've put a lot of effort into making it ergonomic without resorting to a macro DSL. It supports all the usual things like SSR and hydration, along with a few nice extras like scoped CSS.

[0] https://github.com/silkenweb/silkenweb

Re:Emerging Rust GUI libraries in a WASM world by 7znwjshsus on Thursday April 27, 2023 @10:22AM (#35728542)
I love how simple your cargo toml is. A big turnoff of leptos for me was the incredibly messy cargo toml of the examples. I could barely touch it without bricking the project.
Re:Emerging Rust GUI libraries in a WASM world by Firfi on Thursday April 27, 2023 @12:26PM (#35730523)
Author here! I've added it to my TODO list and will update the article at some point coming week or two. Love how the library looks like - thank you for the link!
Re:Emerging Rust GUI libraries in a WASM world by davidatbu on Thursday April 27, 2023 @07:46PM (#35735909)
While I'm usually a no-macros kinda guy, but (I believe) leptos and dioxus provide tooling to hot-reload markup-only changes without (incremental) recompilation. Do you think that would be possible withour macros?
Re:Emerging Rust GUI libraries in a WASM world by ljsb on Friday April 28, 2023 @09:22AM (#35740989)
I can't think of any practical way to do that without macros, unfortunately. I've found incremental compilation to be pretty speedy for small markup changes so far though. I do tend to put the presentation code in it's own crate for larger projects, which might make a difference. Maybe as my projects get bigger I'll start to run into problems.

Some other ideas:

- Temporarily stopping the rust-analyser server to avoid lock contention on the build dir.

- Using cranelift codegen backend (not sure of it's current status).

Re:Emerging Rust GUI libraries in a WASM world by davidatbu on Saturday April 29, 2023 @01:10AM (#35750227)
Thanks for the ideas! Separating out presentation crate into it's own crate sounds like a great idea. Re "temporarily stopping rust-analyzer", I came across this trick[0] to make RA use a different build path (trading off disk-space for speed, but I mean, disk space is cheap).

Re: cranelift, I gotta check that out! Thanks for the reminder!

[0] https://github.com/rust-lang/rust-analyzer/issues/6007#issue...