14 ms·
Rust required to build Gecko
- echelon 10y agoCongrats Mozilla! It's fantastic to see Rust becoming a cornerstone of Firefox. Rust has such a bright future ahead, and it's going to lead to great productivity and safety gains.
- newscracker 10y ago> Rust has such a bright future ahead I believe it'd be mutual - Firefox would have a bright future because of Rust...and vice versa.
- Animats 10y agoLooking forward to the day when builds no longer require a C/C++ compiler.
- Yoric 10y agoThat might take some time :)
- Null-Set 10y agoRust itself depends on clang to build the llvm backend it runs on top of, so you can't get away from c++ that easily.
- lambda 10y agoIf Gecko is ever able to get rid of all of it's C++, it won't happen for quite a while, that will be an enormous undertaking. I would expect, if Rust is successful enough that that is feasible, then by that time there would be multiple different Rust implementations, and some of them may be written in pure Rust. There's no fundamental reason that the Rust compiler has to be dependent on LLVM. It's just a good strategic decision as it allows the Rust developers to focus on the parts of the compiler that are unique to Rust, and use a well tested backend with lots of existing optimizations and targets for the parts that aren't particularly unique to Rust. There is actually some discussion already of using a faster, pure-Rust backend for debug builds, and maybe far in the future for release builds as well (https://internals.rust-lang.org/t/possible-alternative-compiler-backend-cretonne/4275 https://internals.rust-lang.org/t/possible-alternative-compi...).
- lmm 10y agoThe relevant parts of the LLVM toolchain could be ported to Rust. IIRC Rust originally bootstrapped with OCaml.
- sayrer 10y agoGreat! Now use a build system that downloads the compiler too. For example, Bazel will download a copy of the Go compiler if you are using it to build Go programs.
- Manishearth 10y ago./mach bootstrap does this for Gecko.
- sayrer 10y agoIt look like "mach" is a tool that helps with Makefiles. I am not sure you understood what I wrote. Or, maybe all of the environment variables I used when I worked on Firefox just happen to be the same, but the build system is totally different.
- Manishearth 10y agomach is the entry point of the build system. mach build builds it, mach bootstrap fetches prerequisites.
- derefr 10y agoIt does. As it says in the announcement.
- sayrer 10y agoIt says you have to update the rust compiler on your own: "You can stay current by running `rustup update`."
- Manishearth 10y agoI believe running mach bootstrap again will just work (if not we can make that happen). I don't think it's a big deal that the possibly-sudo-requiring step is kept separate and not automatically invoked on build.
- shmerl 10y agoDoes Mozilla plan a new Firefox based on Servo, or simply to replace parts of Gecko with Servo parts? And if the later, why not to make a new browser from Servo as a parallel project that will eventually match Firefox in functionality?
- Manishearth 10y agoBoth, ish. We definitely want to replace bits of Gecko with Servo code (in general, Rust code). That is already happening. Servo development is still continuing. Servo and browser.html are evolving in the direction of eventually becoming a product. We don't know right now if they will. In the meantime, Gecko can reap the benefits.
- Vinnl 10y agoMatching Firefox in functionality is quite an undertaking, so for the short to mid term, the former is far more likely to be successful. That said, I think Servo has a bright future ahead as well, even before the long term. For example, matching the functionality of embedded rendering engines for hybrid apps is far more likely, and Servo has its speed as a major advantage over the competition. And who knows, it might make it into Firefox for Android :)
- cesarb 10y agoI tried Servo a few days ago, and it matches my experiences with the single-digit milestone releases of Mozilla (https://en.wikipedia.org/wiki/History_of_Mozilla_Application_Suite#Release_history https://en.wikipedia.org/wiki/History_of_Mozilla_Application...): I could easily make it crash in just a few minutes. Back then, it didn't take long until Mozilla was stable and usable enough that I could use it as my main daily browser, and I expect the same to also happen with Servo. Of course, Firefox is far ahead in functionality, but Servo doesn't need all of Firefox's features to be successful.
- Cyph0n 10y agoKeep in mind that websites have gotten a lot more complex since then, so it's a different scenario entirely.
- userbinator 10y agoGecko is already dependent on a lot of things so adding Rust might not be that big of a change, but IMHO a long and large list of dependencies and complex build processes are what can really put off those wanting to contribute to browsers (among other software) by fixing bugs or whatever else. I have personally experienced a few times where it was easier and faster to just patch the binary than figure out how to compile everything from source and go through the whole configure/install/etc process again. Especially with browsers, which not everyone agrees on how they should be and desires to customise, only to find that the option to do so has been removed or a source change must be performed, is subsequently delighted to know that it's open-source so they should be able to do it easily, but then get overwhelmed and give up after they realise the effort needed just to build an unmodified version of the software themselves. They then fall back to merely complaining on the Internet, and reluctantly accepting their "fate"... somehow, I feel like some of the visions of open-source didn't quite turn out as well as hoped.
- pawadu 10y agoWe call this the OpenOffice syndrome
- slacka 10y agoI guess you haven't built it a decade or so(if ever). It's literally this easy to build: $ git clone git://anongit.freedesktop.org/libreoffice/core $ apt-get build-dep libreoffice $ ./autogen.sh && make With any relatively standard Debian/Ubuntu distro, you can have your own custom build in about an hour or so. Progressive builds just a few min if you have ccache setup.
- cesarb 10y agoYeah, but that's LibreOffice. The other OpenOffice descendant (Apache OpenOffice) still uses the old build system, and is still very complicated to build as a result; just look how long it took for its developers to release the 4.1.3 version, which was a very minor patch release.
- jacksoni 10y agoIt is a very profitable post for me. I’ve enjoyed reading the post. It is very informative and useful post. I would like to visit the post once more its valuable content. http://jsonconverter.com http://jsonconverter.com
- sandyarmstrong 10y ago> Rust language in Gecko is an important part of Project Quantum. For anybody who missed this, Project Quantum is a Mozilla project to dramatically improve Gecko. Part of this project is to bring in Servo components like CSS and WebRender, hence the Rust dependency. More awesome info: https://wiki.mozilla.org/Quantum https://wiki.mozilla.org/Quantum https://medium.com/mozilla-tech/a-quantum-leap-for-the-web-a3b7174b3c12#.9tuvysk2r https://medium.com/mozilla-tech/a-quantum-leap-for-the-web-a... https://billmccloskey.wordpress.com/2016/10/27/mozillas-quantum-project/ https://billmccloskey.wordpress.com/2016/10/27/mozillas-quan...
- harisamin 10y agoAwesome!