4 ms·
Abandoning ~90k LOC certainly seems like a bad idea, but since Rust can basically pretend to be C, you could just peel off a certain part of your app, and have
by steveklabnik 11y ago
Abandoning ~90k LOC certainly seems like a bad idea, but since Rust can basically pretend to be C, you could just peel off a certain part of your app, and have a hybrid codebase. Your C++ would just link to the Rust like any other C library. This is the approach Firefox is taking.
- k__ 11y agoFirefox' C parts are getting incrementally rewritten in Rust?
- steveklabnik 11y agoSlowly. There's two patches right now: using Rust for URL parsing, and an MP4 parser. They're not being built by default, but you can set an option at compile time to use them. There's some more work to be done before they'll start appearing in regular builds. See here for more: * https://developer.mozilla.org/en-US/Firefox/Building_Firefox_with_Rust_code * https://bugzilla.mozilla.org/show_bug.cgi?id=1175322 * https://bugzilla.mozilla.org/show_bug.cgi?id=1151899 (and Firefox is mostly C++, not C)
- Manishearth 11y agoAddendum: The URL parser is a replacement (it's the same parser we use in Servo), but the MP4 thingy adds new functionality.
- vvanders 11y agoYeah, this is very appealing, ideally migrating new features/submodules rather than rewrite.