4 ms·
I think Rust is great and I think having Rust code in Firefox will be great. But this is about more than just transient build system issues. If we want to comp
by nnethercote 11y ago
I think Rust is great and I think having Rust code in Firefox will be great.
But this is about more than just transient build system issues. If we want to completely replace C/C++ components with Rust components, rather than just having them co-exist, then we need to make Firefox have a hard dependency on Rust.
I suspect I'm a lot more pessimistic than many people about when we can do that; to me it feels like something that is multiple years away. I'd be interested to hear how long you think it will take!
- pcwalton 11y agoI agree with you on the probable time frame here. I guess I had an implicit assumption—which may be wildly false—that maintaining the old BMP decoder wouldn't be too much of a burden. If it is a huge burden, then it would make sense to rewrite it now in C++. Otherwise, thinking long-term, I think it would make sense to rewrite in Rust, trading short-term bug fixes for improved memory safety in the future and less work overall (since you save one rewrite). (Again, though, since we're talking 1,000 lines of code of something that's probably line-for-line-translatable either way; I don't think it's a big deal.)
- metajack 11y agoThe current plan is to have Rust (in the form of rust-url replacing nsUrlParser) riding the trains later this quarter.