News for hackers. Stuff that matters.
Re:Grain: A strongly-typed functional programming language f... by ForHackernews on Tuesday July 31, 2018 @04:52AM (#17651583)
Does Rust have any DOM integration?
Re:Grain: A strongly-typed functional programming language f... by ekidd on Tuesday July 31, 2018 @05:40AM (#17651782)
Yes. For a while, you've been able to embed JavaScript wrappers using 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), which will soon allow the use of 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.

Re:Grain: A strongly-typed functional programming language f... by masklinn on Tuesday July 31, 2018 @05:49AM (#17651807)
There are vdom/components-based libraries based on that as well e.g. Yew seems popular.