5 ms·
Rust and Python are not mutually exclusive languages. Servo uses quite a lot of python in the build tooling and server infrastructure stuff.
by metajack 10y ago
Rust and Python are not mutually exclusive languages. Servo uses quite a lot of python in the build tooling and server infrastructure stuff.
- steveklabnik 10y agoPython also drives rustc's new build system, driving Cargo.
- nickpsecurity 10y agoI'm curious why that was. Convenience for getting the job done? Already installed on a lot of boxes? Something else?
- Retra 10y agoI would suspect it's because it has easy to use and well-developed web libraries.
- nickpsecurity 10y agoThat's my guess, too. I thought Rust might handle a build system by now with all the libraries pouring out. So, I figured I'd ask anyway in case any interesting answers showed up.
- eddyb 10y agoIt is a build system written in Rust: https://github.com/rust-lang/rust/tree/master/src/bootstrap https://github.com/rust-lang/rust/tree/master/src/bootstrap There is only one Python file: https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py https://github.com/rust-lang/rust/blob/master/src/bootstrap/... Its job is to download the previous Rust release (beta for master, stable for beta and previous stable for current stable), including Cargo, build the build system with Cargo and start it. The build system then builds native dependencies (LLVM) and runs Cargo several times for different components.
- nickpsecurity 10y agoWell, there we go. The other comments made me think it was mostly Python or something.
- dbaupp 10y agoMost of the build process is in Rust[0], but something needs to kick it off: instead of assuming/requiring that install the correct version of Rust (for the right platform) themselves and then invoke cargo in the right place to get the build manager, there's a relatively short Python script[1] that does all of that automatically. Python works well because it's everywhere, and it's already a dependency of the build process (LLVM needs it). [0]: https://github.com/rust-lang/rust/tree/b30eff7ba72a78e31acd61a2b6931919a0ad62e8/src/bootstrap https://github.com/rust-lang/rust/tree/b30eff7ba72a78e31acd6... [1]: https://github.com/rust-lang/rust/blob/b30eff7ba72a78e31acd61a2b6931919a0ad62e8/src/bootstrap/bootstrap.py https://github.com/rust-lang/rust/blob/b30eff7ba72a78e31acd6...
- nickpsecurity 10y ago"Python works well because it's everywhere, and it's already a dependency of the build process (LLVM needs it)." There we go. Makes a ton of sense and was one of my options.
- Manishearth 10y agoOur build system (cargo) needs rust to compile, but rust itself needs rust to compile, so something has to give _somewhere_ :)