Interop with JS and WASM from Rust Frameworks #4130
Replies: 1 comment
-
Hello @Qodestackr , I am using wasm-bindgen (web-sys, js-sys) directly in my data oriented project. Initially I built some components myself(like TextBox, DropDown, Panel, DatePicker, TabView, ListView, Table etc., ). I am doing dom manipulation directly using web-sys. I tried some UI frameworks before this, but then I felt, with those frameworks we are trying to bring JS framework patterns to rust world. So I left it completely and started building on my own. Initially it was more time taking, but now I feel very good, because I don't have to chase any framework dependencies, upgrades etc., For state management mostly I did rust way, within scope. Only when needed, I used Arc / Rc / RefCell etc., I think as Rustaceans, we do not have to use any existing JS frameworks like implementations. Though it is hard in the beginning, it is worth in terms of longevity and maintenance. Again, it is purely my opinion and no blame against any frameworks. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone!
I’m currently working on a project where I want to integrate WASM into my web app for rendering radiology images. My setup involves using Remix for the shell, but for the complex, performance-heavy task of viewing DICOM images, I want to leverage Rust + WASM.
I love how Dioxus provides a React-like UI for Rust, but I’m curious if there are any best practices when using Dioxus with wasm-bindgen for seamless interop with JavaScript. Are there libraries, patterns, or specific tools I should be considering to make the integration easy to maintain?
My main goal is to build a performant radiology image viewer in WASM while keeping the maintenance as simple as possible.
Any guidance on this would be greatly appreciated!
Thanks in advance, Sorry if am abit vague, just thinking wasm-bindgen is too low leve for me 🙏
Beta Was this translation helpful? Give feedback.
All reactions