[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some more rust/cargo insights

From: Hartmut Goebel
Subject: Re: Some more rust/cargo insights
Date: Mon, 7 Jun 2021 14:04:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

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/ --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

Hartmut Goebel

| Hartmut Goebel          |               |
| | compilers which you thought are impossible |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]