gecko-dev/python/mozbuild
Nathan Froyd 82c6f5d7a7 Bug 1163224 - add build system support for multiple Rust crates; r=glandium
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.
2016-04-21 09:54:01 -04:00
..
dumbmake Bug 1176642 - Use absolute_import in mozbuild; r=glandium 2015-06-21 18:37:18 -07:00
mozbuild Bug 1163224 - add build system support for multiple Rust crates; r=glandium 2016-04-21 09:54:01 -04:00
mozpack Bug 1260241 - Pre: Add compress option to Jarrer.add. r=glandium 2016-03-28 19:02:05 -07:00
TODO
setup.py Bug 1172645 - Make mozbuild's setup.py work; r=glandium 2015-06-12 09:37:54 -07:00