зеркало из https://github.com/mozilla/gecko-dev.git
82c6f5d7a7
Our current build system support for Rust compiles any Rust crate into a so-called staticlib, which is a static library (.a file) that includes the Rust runtime. That staticlib is then linked into libxul. For supporting multiple crates, this approach breaks down, as linking multiple copies of the Rust runtime is going to fail. For supporting multiple crates, the approach taken here is to compile each crate into a so-called rlib, which is essentially a staticlib without the Rust runtime linked in. The build system takes note of every crate destined for linking with libxul (treating them like static libraries generated from C/C++ files), and generates a super-crate, whimsically named "rul", that is compiled as a staticlib (so as to include the Rust runtime) and then linked into libxul. Thus only one copy of the Rust runtime is included, and the Rust compiler can take care of any inter-crate dependencies. This patch currently only supports Rust code in shared libraries, not in binaries. |
||
---|---|---|
.. | ||
dumbmake | ||
mozbuild | ||
mozpack | ||
TODO | ||
setup.py |