[Top][All Lists]

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

Re: Some more rust/cargo insights

From: John Soo
Subject: Re: Some more rust/cargo insights
Date: Mon, 7 Jun 2021 08:13:44 -0700

Hi Hartmut and Pjotr,

My feeling on this is that we should partner with the Rust community to make shared library support from cargo a priority.  Specifying an output directory is currently a nightly feature, that could be helpful.

In general Rust tooling does not compose with existing tools.  I believe they will be amenable to the thought that it should. If Rust wants to be used in the linux kernel, for instance, it should be easy to use with Make. 

Rust has a very well documented rfc process and we can at least bring it up that way.  I brought up the possibility of collaboration between rust and functional package managers on the rust Zulip, even.  They seemed to like the idea.

Another path we should checkout is to see what Debian does. My understanding is that they figured something out.  Worth a shot, but I’d rather the problem be fixed upstream. It will just take collaboration.



On Monday, Jun 07, 2021 at 5:04 AM, Hartmut Goebel <> wrote:
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

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 \

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 | |
|;!!IKRxdwAv5BmarQ!KvLeCSlBvF9faFS6qJxYA0Rl0AuuhxYx7oxMtZXdbILpmv_Rz4n8swX7_p74sQ$ | compilers which you thought are impossible |

reply via email to

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