From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EJq+LTBlVWeSEQAA62LTzQ:P1 (envelope-from ) for ; Sun, 08 Dec 2024 09:21:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EJq+LTBlVWeSEQAA62LTzQ (envelope-from ) for ; Sun, 08 Dec 2024 10:21:52 +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=bFd89Pyr; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733649712; a=rsa-sha256; cv=none; b=BQ8YI5SIxLHwmdUDCYJjHbli1hiWReddo26YV7E+huQbHE49gjbM67iAHhbVB8f71A6u8q axSlvkmwvk9hJ/XseNDVc9TfHx6y9vOshuwuvVQU5iP5JkSxOHJezZFplEsIYvFsPc0Isp uRG9PmxfZwGKIeZbfc6Uj1uDbhSJ46sIwzhdR0ieXHNIUTB95gsH/sv7NRDmrg9ZFxpj+J J730+oug9WDD55oVZRE20uVZq3m10D2XyOv8Mg56vfF/gXOEG//YQ9WB4g4WpWU3gFsQyK 4WSEr7fDsU2pBZNyT3JEtARfGoxODUDpB5STLKd/MwW3F9oIBfZgWPIpbl9srw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=bFd89Pyr; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733649712; 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=QNOIf4tJq08VeJAsRPp6on0H5uK3WXALUfVchGizgVo=; b=UV9ypFLrER2wNJnxhIEHYb7oChIb+oHJfFDERzk3tCGa43+je6hmnS09Y67ndRgY5c9sce vWlbO5oWF5l38VdYrqgzXsJdZ9HEa9WYEwFc8B7+BJd1/IxjZVwSVSQiBLIw0FrK1udvu6 PI2PzomGGVlnYQ5HVh9pYW7ZW6+5BR7gbi0L0Q4L3j4XvBrWpAGwBVQhhD1NCesBLQE02P Jmk7vSRZEDTkfdidyabmLsBT7kXEXvK7cfgyu3GMCel7yNg8K3jE+NbmccddmSYx/VfAVd LnnuS9EBDBSYD3FbrBgZUpNBk1P0ap3phMKsklw5rOWMls844g2dM87C601Gvw== 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 0C089857A2 for ; Sun, 08 Dec 2024 10:21:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKDTL-00034E-DL; Sun, 08 Dec 2024 04:21:03 -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 1tKDTK-00033k-80 for guix-devel@gnu.org; Sun, 08 Dec 2024 04:21:02 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKDTI-000469-6G for guix-devel@gnu.org; Sun, 08 Dec 2024 04:21:02 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-434a7ee3d60so25734255e9.1 for ; Sun, 08 Dec 2024 01:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733649658; x=1734254458; 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=QNOIf4tJq08VeJAsRPp6on0H5uK3WXALUfVchGizgVo=; b=bFd89Pyr3/B8+k/QqwsKTBAgdZgn6FiPPKf0bji+1t3YbbfCSsItoDYWSJVu1LcUBs esK9pqZgBFeYrzF/pdcizC+E3iNCprkHFAv8+TLO0PMsWnhS7mV4JLq8rsTrDdcbTiij 7Saxsth4GqTh9OF3UmJqVbV6HKdDKPjd/6fe4p6Ga8uJZjplAzgGbNGATxnvTD1FC9Ad KsFvKwIkYc8ayR4f55SmSrQNyUTM5aUAzezhE5iJL+yeO3Ffcz6rgPudPwLCc6vI/JTe YHlp2wPTYReAYVznHNCJ3ebLFnWCgsag/caKwKRJq8ryHvkF1WoK6VO1X0p4xXnEBFzm UjRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733649658; x=1734254458; 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=QNOIf4tJq08VeJAsRPp6on0H5uK3WXALUfVchGizgVo=; b=TgvvTHWQ0bjAzAQOODN7wjwHkXBzhOBM6Z+cjkDfIzyzAtve3DjCxaA5hF9CVVUTgV QkI3MmjdInayGfLACDWfguR8A25upN48LlW9EorhSRgRD9Y2okSBJbJIjqVASMh4vKSs Oc/ymdcGnT8TfKugMRVTkn6NJle6x0pdWEXdUuLgLeUaNlfLwTdr4ilDIf/ClmnDD2Uu 6pCthI8x+s2GqwMDNJz8s35UMko9DzcVCvBlbf/lzZsIgj3pMkZAtkGfxPEf7v8koiAB cu6UP2gySt0oLjz1O/aMofQK186aOI/CKEAxIccttZkJ1lm5Am2DnBqvNxA+sxLVJfGm /TFw== X-Forwarded-Encrypted: i=1; AJvYcCXFjUbNE3vILvhfUGaXnwMgrudR1d0UbhYDXIJ5vWJOFHPX5C+Qp6XfFudoiwa3kybjpJr/J84LiveL@gnu.org X-Gm-Message-State: AOJu0Ywq3oUpNxherwYeIIA5brwvVyTrv+sBuCtEeCxDmRRMthdArjk9 ZAzRjzmSDO1pdlzqz5Js32xbNuUz2CBt7F7BvMHVePckHZ1SfBOD X-Gm-Gg: ASbGnctIEaRIx/nreDa3Uu2gDxGL1HHLSpO9x5HrEodGISYVaQw7j/tc8djh8EMTADy G5Z0jXABANslUm0Jc3By6DHHJNWgiRgh01uB+WvOwuX5mo4fFJX16pE0JpZvSqMTNFSRDU/oaQV Rg4KLkQWv7f6Si6lfeVzYCCy3JS3YG6KsPMjND3KQ2qU7rW1j7PMA+/TFKhIEExutjuoztw3/Kw ddFRd+LkurtrIfifm/K0T+jUveZyN2DTkdhpGjbTO4tkgp2/w== X-Google-Smtp-Source: AGHT+IG8loE90qfvuX8Ys08g1LNad+6dTtYGZIddRVBrzwaWnj51dHAaLlzrY5mzsbx5HLHORnBHSw== X-Received: by 2002:a05:600c:4447:b0:433:c76d:d56b with SMTP id 5b1f17b1804b1-434dded7ae2mr62162965e9.12.1733649658062; Sun, 08 Dec 2024 01:20:58 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434da119c37sm112973025e9.44.2024.12.08.01.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 01:20:57 -0800 (PST) Date: Sun, 8 Dec 2024 11:20:55 +0200 From: Efraim Flashner To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Ricardo Wurmus , guix-devel , Nicolas Graves Subject: Re: How to build Rust packages Message-ID: Mail-Followup-To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Ricardo Wurmus , guix-devel , Nicolas Graves References: <87ldwy3uhr.fsf@inria.fr> <87o71tanwy.fsf@elephly.net> <87h67iv3nw.fsf_-_@inria.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2oyNlouwRLMjfLpd" Content-Disposition: inline In-Reply-To: <87h67iv3nw.fsf_-_@inria.fr> 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::32c; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-Spam-Score: -2.76 X-Spam-Score: -2.76 X-Migadu-Queue-Id: 0C089857A2 X-Migadu-Scanner: mx12.migadu.com X-TUID: PXs8jawb5Ows --2oyNlouwRLMjfLpd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 05, 2024 at 11:13:07AM +0100, Ludovic Court=C3=A8s wrote: > Hello, >=20 > Efraim Flashner skribis: >=20 > > I still have a copy of the code on my machine but unfortunately it no > > longer builds due to the constant churn of rust packages. > > > > One thing I remember explicitly about it was that building end packages > > was faster than the current method, and that was before taking into > > account reusing build artifacts. > > > > https://notabug.org/maximed/cargoless-rust-experiments >=20 > Neat. >=20 > > Another idea which I'm not in love with is what Debian does. They grab > > all of the sources into one build environment and then build everything. > > It simplifies the dependency management of the sources but for us it > > would make it so that we can't touch anything in rust without causing a > > full rebuild of everything. >=20 > I believe this is also what Nixpkgs does, as discussed in this thread: >=20 > https://toot.aquilenet.fr/@civodul/113532478383900515 I'm pretty sure they parse the Cargo.lock file and download the crates at build time. > I=E2=80=99m not a fan either. But I think one of the main criteria here = should > be long-term maintainability, which is influenced by internal design > issues and by how we design our relation with the external packaging > tool. >=20 > By internal issues I mean things like #:cargo-inputs instead of regular > inputs, which makes the whole thing hard to maintain and causes > friction. (See .) >=20 > As for the relation with Cargo and crates.io, the question is should we > map packages one-to-one? Is it worth it? If the answer is yes, do we > have the tools to maintain it in the long run. As it stands now the package name is effectively prepending 'rust-' and switching any underscores to dashes. Most of the actual packaging work is making sure the cargo-inputs from patches correctly match the versions in Cargo.toml, checking the metadata (license, home-page, synopsis/description), and seeing if any code needs to be removed (such as from *-sys packages). If there are any "real" packages then they normally don't have the rust- prefix. I don't want to go and parse Cargo.lock, automagically generate packages based on that, and then download those as cargo-inputs for packages. Not only does that potentially pull in old versions of libraries which may have necessary updates or patches, it doesn't check them for license data or vendored C libraries. I also don't want to keep a collection of "difficult" crates that need a human touch and have everything else be autogenerated at package build time. I am jealous of the cran updater and all the work Rekado has put into making it work well, and I know I need to actually fix a bunch of stuff with the crates. An updater and also the etc/committer.scm file. There are too many crates to actually package them all, so that wouldn't be something workable to automatically package all of them. I have a script that goes through the crates and lists how many dependencies there are per file, and I have used it in the past to remove unused crates. I have also come back and added them back in when something else needed them. My workflow is I work on 20-50 crates at once, and when they all build correctly I then break them into the appropriate number of commits. I'm not sure where to go from here. I don't even remember if the antioxidant build system correctly shows the dependency path between crates, which IMO is one of the big things missing now. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --2oyNlouwRLMjfLpd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmdVZPMACgkQQarn3Mo9 g1FejxAAk1TAlRtInLgSQxk32YFUQo3E3YupbBxFvodyy/jhkiWhQqddDrX6kR/7 cwjVPVxf2FUoHjLuC3VKkgzOCky+eF55RU/dTx8lgEDArW1xds6ZxUHjI6TMKAN7 wXlBPSid4sknqqwJN/h+ftg7Ei9mYucSbNC8FcHSQ/o/7C/cQ0W/hdmvjOKLfD9L pJOHE3SMjMOypTIBXdk6CmRu2BeRqqfzgpMWcRaFvipZ8ISIMSfz0NjOGuiwiXyb BqXFPu0C1WF//+mkjofeBJkYVfpsDt7dIxHGb/HhYdX//xH3U1oTZbl4BLd/VQ1b KoTlxKoYRtijyeF2FQPCikfAMFcAEDsB8gkMK5uO2/al5GSA/XXbmdF+Y4wviy56 DymaP6sCcSqWpoAYSf2fbeUNDhDBGBgLdVGFTaSkP/ifLZsbkFLUX4PL1hQv3kdU FpzYx6gIYTTL2Lj8oRTihiqe1HiXM5N2DPPrRfsflVWHpIKyxP94t39kETceYjjL l0GyvFTbnTql/UBmmWgf4Z7FK9MM5oFX7WDkJn4LBzJgeGaKGGXffLJcCtVaMuDc 6pAhMHu0DB9s0NfW/vkQokPNGv1Pqhwjav2e8HXyK1uqGmHEnEDiV/bkkVip4+/a 56wJv6IpQ6J1p1LqxHYo2An8kWjQbFx+xwi7c2MN0JO7CGYmJVs= =h5D1 -----END PGP SIGNATURE----- --2oyNlouwRLMjfLpd--