From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SFx2ISYy6GUKygAAqHPOHw:P1 (envelope-from ) for ; Wed, 06 Mar 2024 10:06:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id SFx2ISYy6GUKygAAqHPOHw (envelope-from ) for ; Wed, 06 Mar 2024 10:06:46 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HszWFccU; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709716006; 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=+Y70R5DdBpJcLoHM1DSP/BTu05sOT8nr78YhhLr/ZE8=; b=Y4a9ZzlIhMZsY8fI4biJN3MiofqtcIgaBAMHmQysXklW3RW3hxV6hIbIfOQ9hnlkqzuzF2 DD04HVjGHzd3EZs6oNqeiwFzkIHjJw7o6ohFo4isLWP+cvjRZsvfEfH/K7kFfw1oo7NZ6y rfm42j93zjvx1UYRELypdzF2zzIHRWO6KLs6t6FkeXGKCmU4fcexa1Ie/tSsEkVR8X2a2i 4708/pReIDNMvodJfc1QeOoUlrogkwR2q0XzkWkUAht9w/QNXnA+4wY8tbh7rmz1LpJmna 5kfsx0YHFrvLJxOvE7ohpeBe1B+s3YwhimeFMFq9HtJ0N6JoCeokO/ShAbJQsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HszWFccU; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709716006; a=rsa-sha256; cv=none; b=Ml8vhZXW19bab2RzvJyofXZoQ6jzosCVYYeNS8DsQrQM6yb+qHxcnjH1zKWbtgwcpT6G/z ye0mth8B4mRLE2a+lj1yH9FrlrKT7lpkJt5fXkWAFjS74CMHWGfwa7gmnb7LhohusK+FW0 rZH55vofEXxIsLfnvNlaWO7wIIqt6fEfHtzp+pUjeZ13H+RnWdV9GnKsZwlNIG7iffJFNU 5IWTUmCl9YOjXO/5cBx1fO34NJgE/ITDIwbQ61GLC4EDdCoAExJ8oC7/p3BvZdi80E+UyG rrcCak+qOEPFujBU+ep01p/UKv+CXR9dfakbUu72O9fgBIJfYg6iUTOl/1kElA== 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 5AF166D588 for ; Wed, 6 Mar 2024 10:06:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhnE8-0008NU-2l; Wed, 06 Mar 2024 04:06:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhnE5-0008NM-Oa for guix-devel@gnu.org; Wed, 06 Mar 2024 04:06:14 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhnE3-00051i-Ky for guix-devel@gnu.org; Wed, 06 Mar 2024 04:06:13 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-33e285a33bdso2717110f8f.2 for ; Wed, 06 Mar 2024 01:06:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709715969; x=1710320769; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=+Y70R5DdBpJcLoHM1DSP/BTu05sOT8nr78YhhLr/ZE8=; b=HszWFccUMejA3bpubd92EPYr95PKcXGTVgirxucDR7n4n8BtQW6piE7q7xdIqYMrzx XYRzDrv3oi/J49P7+eZyd6tBgSywpK3JjmIbz2S/K5SNuyi7bJNn1z19l5NF36nBhSQq ngZJdR3JEw50iuGSNmy5NNhtmEWKRXWT8iUG4s8W7QnntbMXTuuC8KXRWAN+6LfiqG00 9jdceu3ARptPJZPDyBKwn0PWAiI34KDVoFzdlT6J3EBzZrbvRAjqRl9hQb6gWWr3tFQC azHf82yhQo/0cGPQ8aveFD+HbZvBnzYbTahjxVd7fgI3i6E1AU35KWZVdeHcQRQJ8hEr RtWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709715969; x=1710320769; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+Y70R5DdBpJcLoHM1DSP/BTu05sOT8nr78YhhLr/ZE8=; b=EWy5hjkYqVahd1LHqtfPFnjDqDzYb+wFOXXXKY35wAIiYqIyOynZUvawz2B3e585hy IclEhCSs8EWrx1GsNXj4BkSzH/1hznuwa1cNOiPNEOspIN7J9QsqpAJncG+dc9xoB3Gq 69AvG9oiX8eKAQ+0DlpMcJdJ985rFsbjaLglKpeuw+SrmAjdxJaL512GlZUCb9dDCnIw wc5LKU4UKI8iqnHcRq2/Hi/QzfjS3W73f4d3okxk028dhroL8goA6Jv76vcKYYLeBvJ2 eNAstWuwqQIfB0T9afAad/aGKs9vFSLfR/nol3sQsyVEPlieRM6Yb4WWplsxNigLYB2A EKnw== X-Gm-Message-State: AOJu0YzSCYJ8foQn/zwBXPp6UV68KOkBxprQhu4BMbIEecjjfRdEizLq 8oUtIJ1o//eeloDN9UQj1hyNzWBaMJ6lCsyeeCazmrklwtaRc6Tb X-Google-Smtp-Source: AGHT+IEGNy5LQW08Rqrh1jS2GhKt0FwD1K3wPrgLy0etK5iPVSVMgdz6WmaIGy+8TQ6JEDFdENuWJQ== X-Received: by 2002:a5d:6ac4:0:b0:33d:bba3:28c3 with SMTP id u4-20020a5d6ac4000000b0033dbba328c3mr8761236wrw.39.1709715968348; Wed, 06 Mar 2024 01:06:08 -0800 (PST) Received: from localhost ([141.226.12.177]) by smtp.gmail.com with ESMTPSA id r12-20020adff10c000000b0033de2f2a88dsm17110188wro.103.2024.03.06.01.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 01:06:07 -0800 (PST) Date: Wed, 6 Mar 2024 11:06:05 +0200 From: Efraim Flashner To: Jason Conroy Cc: guix-devel@gnu.org Subject: Re: rust-team branch merged Message-ID: Mail-Followup-To: Jason Conroy , guix-devel@gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mO6qWia12Ws96VyB" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=efraim.flashner@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.01 X-Spam-Score: -5.01 X-Migadu-Queue-Id: 5AF166D588 X-TUID: wK7RIdw+dPbe --mO6qWia12Ws96VyB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 09:24:29PM -0500, Jason Conroy wrote: > Hello Efraim, >=20 > Thanks for investigating this - a Rust development workflow using only > Guix-native crates is something I've been waiting for! >=20 > I was experimenting with your patches and it seems that they do pull in t= he > source crates for requested packages, but not their dependencies (example > below). Is there something I'm missing? When you say they pull in the source crates do you mean the sources of the other rust packages needed by rust-rand? I didn't test that, but I assumed it wouldn't. Currently if you were to pull in rust-rand-0.8 and rust-rand-0.7 then you'd have both rand-0.*.crate files in the registry but only one of them would be listed in share/cargo/registry/index/ra/nd/rand. I need to adjust the generation of that file to combine multiple sources if they exist, and sort them (I'm not sure it's necessary, but wouldn't be surprised if we hit undefined behaviour if they were listed multiple times or out of order). I also need to figure out something with a config.toml to see if it's possible to generate one that could be included from another one, since you can't add 'local-registry =3D $GUIX_PROFILE/...' in a toml file. > Cheers, > Jason >=20 > $ guix shell --pure bash findutils rust-rand -- bash -c 'find -L > $GUIX_ENVIRONMENT/share/cargo' > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= index > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= index/ra > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= index/ra/nd > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= index/ra/nd/rand > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= rand-0.8.5.crate > /gnu/store/zf88v65rbg2di4qhgdbvhfcjf31rdzby-profile/share/cargo/registry/= config.json >=20 > On Thu, Dec 14, 2023 at 10:10=E2=80=AFAM Efraim Flashner > wrote: >=20 > > On Wed, Dec 13, 2023 at 10:34:11AM +0200, Efraim Flashner wrote: > > > * Compiled rust packages currently have a 'package' phase, which runs > > > the command used to crate a 'crate tarball', and is installed in > > > %output/share/cargo/registry, with unpacked sources in > > > %output/share/cargo/src. In theory it should be possible to use these > > > for local rust development. The benefits include everything that com= es > > > with being a guix package, including pre-patched shebangs. Currently= no > > > index file is created in $GUIX_ENVIRONMENT/share/cargo/registry/index, > > > which is likely necessary to actually make use of this. Additionally= , I > > > am unsure how to use '$GUIX_ENVIRONMENT' in ~/.cargo/config so that it > > > is expanded and not taken as a literal string. > > > > In the Guix London meetup someone mentioned that they were interested in > > playing around with using Guix for rust development. I've adjusted the > > cargo-build-system to produce the registry index files and I added a > > profile hook to generate the config.json to locate the packaged crates. > > > > toml files can't process environment variables (which is probably a good > > thing ...) but that means its a little harder to test out. > > > > with the two patches applied create an environment with the crates you > > want and get the location of GUIX_ENVIRONMENT: > > `env | grep GUIX_ENVIRONMENT | cut -f2 -d=3D` > > > > in ~/.cargo/config: > > [source.crates-io] > > local-registry =3D '/share/cargo/registry' > > > > 'cargo build' should pull from the local crates in the GUIX_ENVIRONMENT. > > I'm not sure what happens if it doesn't have those crates available and > > would need to get them from crates.io. > > > > --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --mO6qWia12Ws96VyB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXoMfoACgkQQarn3Mo9 g1Hu0xAAicCHXi4CndFRvxfXeqmVP75YL0m5OOvc5aA7XftPBY5L0EFgozQMbxL2 p1kRWMFWu9qOVbCEnS6veZ+X7s+j1qtviGcTkHzukWrJEM4WB7P+mbDfi/24gJm7 5TB1Obmad4PoZEI33rJzesaWeW4d+vWVx9feIJzohQavOGT4KDM+H3D/1Nsk/788 J9b+FF9ycDlgL3D7OtpiclbCgEG/BJFM2XKEJ/JfByPNi7FjPH2I2ZRpoarvHVad +wVHGSxBK3DduKdivgLCZp01DSFH/v275lRUDlvW1TqaWHht6VXiC6zwN2eKQS1y EIeP2+6BIYDjC41BdF666CYNlT+0XIgJoUaVDa68fM/9k6hFldcMje11xkviBPDm RM6aIDoMrmP22O+QhQhzLCjHx0gTGDyFlvfg4xlBoFiNVl9wqgRWXyE5IEaqt8OS WLux3G0J9t4Ds75ZVq+XKwWto+GjtmNJSC4kGOWFCLPvFeKB1nzEG9siKIzaUEJH b4XShqDmg7kMpKQ0AExQoRwkUQwkwVdbxLepu6o3mSTL14w5hTokEZ6n6wkSr2pU 6jsfTrIt6b5AuXVeS9bhvVpkr8U3jnV6H9UazvL8WYfCvtYnZWv8q8Zt6RzBdaqE 22mGTMhRIwapN4pJ+6janMgs9ctmBbLtgUol9UzfUhcHhfmeInk= =9Ze/ -----END PGP SIGNATURE----- --mO6qWia12Ws96VyB--