I wish writing safe DOM code were as easy as "just use Rust", but it isn't. There are thorny issues around rooting and GC that are not yet solved. (This is *not* to say C or C++ are fine for DOM code. They make the problem worse.)
What’s the privilege boundary here? Not being facetious. The self-hosted DOM of my dreams would follow the principle “functions that the user can compatibly polyfill in JS are in JS, while others remain in Rust”.
-
-
Maybe that doesn’t result in very much self-hosting in practice. Dunno.
-
cc
@ManishEarth: Here’s another silly idea: What if you could never store a strong reference from Rust code to a DOM object, ever? All JS object pointers would be forced with lifetimes to be stack-only. Use the reserved slot API and native JS collections for object data. - 14 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.