TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fast, Bump-Allocated Virtual Doms with Rust and Wasm

241 pointsby BoumTACabout 6 years ago

10 comments

ilovecachingabout 6 years ago
How exciting. One of the great things about React is that it's just as much a pattern as a library, and with Rust macros and v-dom it should be rather easy to build something similar to JSX in Rust (with the proper Rust-isms of course). Can't wait for Rust to rule the web.
评论 #19392584 未加载
评论 #19397326 未加载
评论 #19396175 未加载
gamblerabout 6 years ago
<i>&gt;Virtual DOM libraries provide a declarative interface to the Web’s imperative DOM.</i><p>I&#x27;m not sure what this means. DOM is an object model for HTML. It is mutable, but HTML itself is definitely declarative.<p>Which brings up an interesting question. Why are DOM-diffs something that is done by userland libraries when it can and probably should be done by the browser itself?
评论 #19394312 未加载
评论 #19393303 未加载
评论 #19393249 未加载
评论 #19394979 未加载
评论 #19393991 未加载
评论 #19394028 未加载
评论 #19392936 未加载
评论 #19395305 未加载
评论 #19393031 未加载
hiccuphippoabout 6 years ago
Yes, I was thinking web developers, rather than using rust and wasm directly, would first get the benefits when the libraries they use start moving the heavy duty parts to it. Can&#x27;t wait to see if someone uses this for building a react-like framework.
评论 #19392465 未加载
评论 #19392606 未加载
评论 #19392182 未加载
writepubabout 6 years ago
Firstly, congrats on shipping a virtual DOM lib in WASM. Hopefully, frameworks intent on using a V-DOM will greatly benefit from this.<p>Having said that, is a V-DOM required in 2019, if DOM updates are optimally batched, like in FastDom ( <a href="https:&#x2F;&#x2F;github.com&#x2F;wilsonpage&#x2F;fastdom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wilsonpage&#x2F;fastdom</a> ). Decades of optimizing browser internals would surely account for not trashing the DOM, if updated optimally. So, is it required?
评论 #19392287 未加载
评论 #19392537 未加载
评论 #19394015 未加载
评论 #19392369 未加载
Bahamutabout 6 years ago
The benchmark has some old versions of Angular (2) and the legacy AngularJS (1.x) - how do the benchmarks look with a more recent version (v7)?
评论 #19395697 未加载
cmroanirgoabout 6 years ago
It seems memory fragmentation can occur, rather easily, if you hold onto a few of them.<p>&gt; <i>The disadvantage of bump allocation is that there is no general way to deallocate individual objects and reclaim their memory regions while other objects are still in use.</i>
评论 #19393316 未加载
dmitriidabout 6 years ago
Why virtual DOM is not a part of browser APIs is anyone’s guess at this point.
评论 #19415238 未加载
评论 #19394184 未加载
anonytraryabout 6 years ago
The benchmark leaves me wondering if this was worth it.
btownabout 6 years ago
Could this be used in something like Cloudflare Workers to enable server-side rendering?
moron4hireabout 6 years ago
Bump allocation sounds a lot like heap allocation. Is a &quot;bump&quot; a small heap?
评论 #19394321 未加载
评论 #19394654 未加载