News for hackers. Stuff that matters.
Re:I rewrote Firefox's BMP decoder by pcwalton on Friday November 06, 2015 @11:06AM (#10520154)
> There's still a bunch of build system issues to be solved before any Rust code can be included in Firefox. You can follow along at https://bugzilla.mozilla.org/show_bug.cgi?id=1135640.

It seems unfortunate to be maintaining two BMP decoders because of transient build system issues. Especially if we're going to have to rewrite Piston's, making us maintain three for a time. I understand if there was some pressing need to ship it now, of course, but other than that I think I would have preferred this be written in Rust as well.

I guess it's not a big deal for 1,000 lines of code, though. We could probably do a line for line translation without much effort.

Re:I rewrote Firefox's BMP decoder by nnethercote on Friday November 06, 2015 @04:32PM (#10522194)
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!

Re:I rewrote Firefox's BMP decoder by pcwalton on Friday November 06, 2015 @06:13PM (#10522678)
I 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.)

Re:I rewrote Firefox's BMP decoder by metajack on Saturday November 07, 2015 @12:21AM (#10523850)
The current plan is to have Rust (in the form of rust-url replacing nsUrlParser) riding the trains later this quarter.