Actually something where Rust still fails short of being an alternative to Delphi/C++ on Windows, regarding tooling and productivity.
Looking forward to the HoloLens collaboration or Microsoft now pushing for Rust on their security guidelines will actually improve that experience.
- "Crossing the C++/Rust boundary can be difficult."
- "For components that are relatively standalone, with small and simple APIs."
- "This minimizes the C++/Rust boundary layer issues."
Not only does Rust not have a good JavaScript integration story, it doesn't have a good C++ integration story.
Most of Firefox is still (8 years later) not written in Rust.
Chrome with C++ has a waaaaay better safety record than Firefox. Guess what? The C++ in Chrome tries to ensure memory safety for JS.
The C++ Chrome tooling does a better job of memory safety as a whole system than Firefox.
<nit>In part because 1.0 release of Rust popped up in 2015, not 2011.</nit>
Not necessarily. If the language provides a way to ensure memory management of DOM objects is correct across language boundaries, it would provide an effective defense against these issues.
Safe memory management across a combination of managed and unmanaged code is a tough problem, and Rust (and perhaps Swift?) are the only languages I know of that have any attempts to solve it. It requires both language and library support. There are several competing solutions in the community: luster [1], shifgrethor [2], and josephine [3] come to mind. All of them allow this kind of code to be implemented safely.
[1]: https://github.com/kyren/luster
[2]: https://github.com/withoutboats/shifgrethor
[3]: https://github.com/asajeffrey/josephine