From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0GJAGb43vmBmbQEAgWs5BA (envelope-from ) for ; Mon, 07 Jun 2021 17:14:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2DOyFL43vmCLbgAA1q6Kng (envelope-from ) for ; Mon, 07 Jun 2021 15:14:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8E24C1BF9D for ; Mon, 7 Jun 2021 17:14:05 +0200 (CEST) Received: from localhost ([::1]:44556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqGx2-00057n-6f for larch@yhetil.org; Mon, 07 Jun 2021 11:14:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqGws-00057e-Fn for guix-devel@gnu.org; Mon, 07 Jun 2021 11:13:54 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:37398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqGwp-0001d0-B6 for guix-devel@gnu.org; Mon, 07 Jun 2021 11:13:53 -0400 Received: by mail-pl1-x632.google.com with SMTP id u7so8860435plq.4 for ; Mon, 07 Jun 2021 08:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version; bh=Sm41HwHqGrexPPERpQXMYyz57VXwCKNGO5udZCAJ5KQ=; b=rjspidciul9LBa4J/Mjd/10HkNmuGTuVQPbWL5LPn/0/ZYwZQcbdIDETTlH0TrmwX6 8Ub1RfSi5ewhhr72yzbCQkKWSinC4HtBfDS3cGRKbYJLgZ+nekiWw8Awe1rSLKClmykI EMQVM3AQnxqjedZXlRYnZqJO6mjoqAb4CgtXBrLD/058lzwwOwP3yTRYk9fP0q/xgPET rVNCxIW6LNLiahvPJ9p9zd8N/+I9FyS0YpX/uiPBCXhrTnx/IOSe8FBhu5Cw6EwBZamf 8bUeGf8cJL8zW8Qd6HmREaHunqNiMp0IAM1lmEx+x8QwxgR3UUSgY2YtJXka3bTfddNN /xQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version; bh=Sm41HwHqGrexPPERpQXMYyz57VXwCKNGO5udZCAJ5KQ=; b=qB6hBAqkd6jra/ML/Ub30Umu9Je6BXJfTxblAWZblk345OIdFqMAuNtZR1k6Y/FCFi h3O4MMsskvk4XfCl6yQi8g7jJ5fBzr4tT8sb/8+z28ChFjts3o8hRMQ6Umsbk4XobGyP jNU7tS5dMwFkA03S24RjkTiHEi9kK0Ntqjx3lUNIk+0XdSIBEaUdX8crit3gJsERTe0y umfS8UCQLtIBkLK1C7BLkzpnkKqrp9sFaGRarQIehI5JP0clb9NxLYifX53YxjQ/ewCe Kexb9glGTEmbLGbTEcXJBZmmvIS3q++1tkeBKW9lIqDyRhst7YCHpZvAbX41wcZTEH1l /iIw== X-Gm-Message-State: AOAM533BznMwgSS2Rb2TodR16BHqa/E7s2TgylGdd/wWhCeGyniq93SN gMm1d51MaclX/IabApZfJJ/vfbGLKdwMTw== X-Google-Smtp-Source: ABdhPJxSDATFChcwvcNneagtNYcvMnVDdudgHuiMk/QPD6lRCKzN21Ov+Z1C+wmHak5/u9pEVUocdA== X-Received: by 2002:a17:90b:354:: with SMTP id fh20mr21061993pjb.67.1623078825747; Mon, 07 Jun 2021 08:13:45 -0700 (PDT) Received: from [2603:8001:3c01:90b6:100::] (2603-8001-3c01-90b6-8c7b-17ca-1768-b108.res6.spectrum.com. [2603:8001:3c01:90b6:8c7b:17ca:1768:b108]) by smtp.gmail.com with ESMTPSA id j12sm9117281pgs.83.2021.06.07.08.13.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jun 2021 08:13:45 -0700 (PDT) Date: Mon, 7 Jun 2021 08:13:44 -0700 From: John Soo To: Pjotr Prins , Hartmut Goebel Message-ID: <423077fd-39c6-4bff-b4a8-26d33ce6c41d@Canary> In-Reply-To: References: <7d180f4a-3e5f-374b-0fcd-6ae5b438a1c8@crazy-compilers.com> <20210606183857.gthvipntymstivh4@thebird.nl> <1030d59f-32ef-bab0-00f7-aa81f2133517@crazy-compilers.com> <20210607082830.uo73mksfvogfxxf6@thebird.nl> Subject: Re: Some more rust/cargo insights MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="60be37a8_6b8b4567_61d6" Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=jsoo1@asu.edu; helo=mail-pl1-x632.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_NOVOWEL=0.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623078846; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Sm41HwHqGrexPPERpQXMYyz57VXwCKNGO5udZCAJ5KQ=; b=lK+H4fLoojsD5Td/crCfNxbYrlYPHMA7n5LJmDgeywn2jJMA5XOlpG2ZUfc3yxbj8oAP4u i//oAoQ1H7DV7YWP+qr2ziC5PciS07efE2RxiXj5ynVvyT1TivJ8Gn1AX29mK11lV6ZfsQ d/Hk2IXqqzkHm1lwSyKmKAKN0FAqE/H9XwXQFjmOj0oHx5RI5GMUfDiU2TbPG1XBaHE5S+ VB5e5Gv8XmqF/DIokUXsOZXyCup4zeOqXgYevoY69Dn1s60X9uXAB6lmDnDpOL/hrl3bv5 4WwZCSOCoUhz9lQ8kABFs5GTE80eEPs5Ba67ab23bo/xVR6lKVTvq+xSgpLMqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623078846; a=rsa-sha256; cv=none; b=M2b56VO5cJ3NFXOD8cWzDL37guhJOsg2xhDfjoByzFA1ifSPvl8GOb7adLoBVwbDKZero9 /5202MXgJizhAlBp3jovt5vn6VLv30MI2dWq3dvojVF1OvuNiBHz+XYxs0e3OUQIK+a1ko 9ozQzKURbtPCrqT6muZDjUAqQIfQ2qJI/E8O56WFjgsKXyHAcmwf6665lF4fAX9iCJPQHY HxFa8LwNDBELEs5ojxAdYTXFq/LFHaIwPBgshkZJSyXVVFyDGgSXpUGNk+gqIc0/eNUAdi FEEd0gsE6cz3FbTdxyFgLyLN2IClm6L//FK43osIDcnAQYGpOGzT8HjNP1f95g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=asu-edu.20150623.gappssmtp.com header.s=20150623 header.b=rjspidci; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=asu-edu.20150623.gappssmtp.com header.s=20150623 header.b=rjspidci; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=asu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 8E24C1BF9D X-Spam-Score: -0.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9eND4ydQ13Pw --60be37a8_6b8b4567_61d6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Hartmut and Pjotr, My feeling on this is that we should partner with the Rust community to m= ake shared library support from cargo a priority. Specifying an output di= rectory is currently a nightly feature, that could be helpful. In general Rust tooling does not compose with existing tools. I believe t= hey will be amenable to the thought that it should. If Rust wants to be u= sed 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 a= nd functional package managers on the rust Zulip, even. They seemed to li= ke the idea. Another path we should checkout is to see what Debian does. My understand= ing is that they figured something out. Worth a shot, but I=E2=80=99d rat= her the problem be fixed upstream. It will just take collaboration. Kindly, John > 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 dependencie= s > > 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=5FLIBRARY=5FPATH=3D'=24PWD/target/release/deps:/gnu/store/=E2=80=A6-= rust-1.45.2/lib' =5C > rustc =E2=80=A6 src/lib.rs --crate-type lib =5C > -L dependency=3D=24PWD/target/release/deps =5C > --extern > xmlparser=3D=24PWD/target/release/deps/libxmlparser-53596ac1828b1c97.rm= eta > > Thus I assume one could pass the rlib's of all dependencies in -L and > the respective mata-data in --extern > > -- > Regards > Hartmut Goebel > > =7C Hartmut Goebel =7C h.goebel=40crazy-compilers.com =7C > =7C https://urldefense.com/v3/=5F=5Fhttp://www.crazy-compilers.com=5F=5F= ;=21=21IKRxdwAv5BmarQ=21KvLeCSlBv=469fa=46S6qJxYA0Rl0AuuhxYx7oxMtZXdbILpm= v=5FRz4n8swX7=5Fp74sQ=24 =7C compilers which you thought are impossible =7C= > > --60be37a8_6b8b4567_61d6 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22>
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. =C2=A0Specifying an output directory is cu= rrently a nightly feature, that could be helpful.

In general Rust tooling does not compose with existing tools. =C2=A0I b= elieve 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 w= ith Make.=C2=A0

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

Another path we should checkout is to see what Debian d= oes. My understanding is that they figured something out. =C2=A0Worth a s= hot, but I=E2=80=99d rather the problem be fixed upstream. It will just t= ake collaboration.

Kindly,

<= div>John




On Monday, Jun 07, 2021 at 5:04 AM, Hartmut Goebel <h.goebel=40crazy-compile= rs.com> wrote:
Am 07.06.21 um 10:28 schrieb Pjotr P= rins:
Exactly my idea. One challenge wi= ll 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 t= he Guix package. Or have a separate
one for sources. We do that for i= nclude 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 ass= ume)

When cargo calls rustc, the command looks like:

LD= =5FLIBRARY=5FPATH=3D'=24PWD/target/release/deps:/gnu/store/=E2=80=A6-rust= -1.45.2/lib' =5C
rustc =E2=80=A6 src/lib.rs --crate-type lib =5C
= -L dependency=3D=24PWD/target/release/deps =5C
--extern
xmlparser= =3D=24PWD/target/release/deps/libxmlparser-53596ac1828b1c97.rmeta
Thus I assume one could pass the rlib's of all dependencies in -L and <= br>the respective mata-data in --extern

--
Regards
Hartm= ut Goebel

=7C Hartmut Goebel =7C h.goebel=40crazy-compilers.com = =7C
=7C https://urldefense.com/v3/=5F=5Fhttp://www.crazy-compilers.co= m=5F=5F;=21=21IKRxdwAv5BmarQ=21KvLeCSlBv=469fa=46S6qJxYA0Rl0AuuhxYx7oxMtZ= XdbILpmv=5FRz4n8swX7=5Fp74sQ=24 =7C compilers which you thought are impos= sible =7C


--60be37a8_6b8b4567_61d6--