Am 07.06.21 um 10:28 schrieb Pjotr Prins:
Exactly my idea. One challenge will be that the source of dependencies
need to be available - think of it as include files. One thing we
could do as ship them as part of the Guix package. Or have a separate
one for sources. We do that for include files already.
Well, the current cargo-build-system already handles the source
dependencies.
We need to aim towards pre-built libraries (rlib, much like .a files in
C, I assume)
When cargo calls rustc, the command looks like:
LD_LIBRARY_PATH='$PWD/target/release/deps:/gnu/store/…-rust-1.45.2/lib' \
rustc … src/lib.rs --crate-type lib \
-L dependency=$PWD/target/release/deps \
--extern
xmlparser=$PWD/target/release/deps/libxmlparser-53596ac1828b1c97.rmeta
Thus I assume one could pass the rlib's of all dependencies in -L and
the respective mata-data in --extern
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goe...@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |