Files
lix/lix/rust-monocrate
Qyriad 03dc13a314 rust support in libutil via rust-monocrate
Co-authored-by: Jade Lovelace <jadel@mercury.com>

Change-Id: I026f271b07c9e27012f9ee1c16a2a1f4ba7f6ba3
2026-01-06 16:35:49 +01:00
..

What the hell is this?

This is a cursed solution to the intersection of the following problems:

So! What do we do? For any Rust code that Lix wants to use, we always link to a single crate, which will reëxport Rust code from any crate (in-tree or out-of-tree) we wish to use. This "monocrate" is always built as a static library, and anything in Lix that depends on Rust code will statically link it in. When the Lix executable is linked against Lix libraries that are built statically, we do not link_whole them. As far as we::Qyriad can tell, this is sufficient to not break everything. But long-term, we should probably solve this problem by migrating to Rust code at top-level, and having Rustc do the final link.