3 ms·
Like comparing to Rust compilation to WebAssembly for example?
by thangngoc89 8y ago
Like comparing to Rust compilation to WebAssembly for example?
- ForHackernews 8y agoDoes Rust have any DOM integration?
- ekidd 8y agoYes. For a while, you've been able to embed JavaScript wrappers using stdweb (https://github.com/koute/stdweb https://github.com/koute/stdweb). There are pre-built libraries covering much of the DOM. But you may need to submit PRs if you get heavily into <video> or something else with non-standard APIs. The shiny new toy is wasm-bindgen (https://github.com/rustwasm/wasm-bindgen https://github.com/rustwasm/wasm-bindgen), which will soon allow the use of WebIDL (https://heycam.github.io/webidl/ https://heycam.github.io/webidl/) to wrap the entire browser API, if I understand correctly. In practice, it all seems to work pretty well. But for public-facing sites, you need to watch the number of dependencies you include and keep the *.wasm size down.
- masklinn 8y agoThere are vdom/components-based libraries based on that as well e.g. Yew seems popular.