3 ms·
React core team discussing re-writing internals in Rust
- praveenperera 6y agoAt 39:05 Transcript (by dtolnay on reddit: https://www.reddit.com/r/rust/comments/hkaxgl/react_core_team_discussing_rewriting_internals_in/fwrsbak/ https://www.reddit.com/r/rust/comments/hkaxgl/react_core_tea...): Q: This is a question that I haven't heard of before: is React going to be rewritten in Rust? Is that just a rumor? What's all of this? Andrew Clark: Well if we do rewrite it in Rust, we would do it in such a way that you would not notice it. Q: That's sneaky! Andrew Clark: Because if we did, it would be the internals, you know. I mean maybe there's a future (in some distant future) you could write components in Rust, but that's not what-- when people alude to that, that's usually not what they mean. They mean the internals might be rewritten in Rust. Currently they're written in Flow-flavored JavaScript. So unless you're a contributor (which you know we care about those as well) if we did rewrite in Rust it probably wouldn't affect most people who are listening right now. I don't know if we want to say anything more about that. But that's not happening tomorrow or the next day. Maybe next year or the year after that. Sebastian Markbåge: In general there's growing support for Rust within Facebook projects. So for example the Relay compiler work is currently being done in Rust and they've had great success with that. There's React Native internals (I think there was a question actually I can answer that at the same time about Swift in React Native) and the current big project for React Native, codenamed Fabric, is C++ and so you can expect most things in React Native to be going more to C++ to share a codebase and also because of performance especially on the Android side. So you can share the code between them. So I see less of the Swift taking over on iOS and more C++ taking over on iOS just so we can also share it with Android. But there's a lot of interest on the people writing this in C++ because they see Rust and they see all the features to be able to take advantage of that. And there's also interest in Facebook in general to be using Rust for native apps. But there's a lot that goes into that to making sure it works in practice. There's a lot of build tooling, there's a lot of need to set up with the ecosystem. Rust isn't particulary well tested on ARM. And once you start writing in Rust you have to now download the whole standard library; that can make your apps larger than equivalent C++. And the same thing applies to the web: once you start writing in Rust it wouldn't be Rust the standard Rust you see because the standard library would be way too big for us to include with the React release. So I think there's a lot of momentum in this space but there's also a lot of work left to do to make that infrastructure actually work well. But it's exciting if it does. Q: I saw in the Stack Overflow State of the Developer survey that Rust is the "most loved" language and it's been winning and climbing in the ranks for quite a few years now so I'll be curious to see where it goes as a language and as more and more people adopt it for sure.