From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OOezBMMBbWKPZgEAbAwnHQ (envelope-from ) for ; Sat, 30 Apr 2022 11:30:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OFSNBMMBbWKc/wAAauVa8A (envelope-from ) for ; Sat, 30 Apr 2022 11:30:43 +0200 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 8FEBE17111 for ; Sat, 30 Apr 2022 11:30:42 +0200 (CEST) Received: from localhost ([::1]:38422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkjR3-0003Dz-O5 for larch@yhetil.org; Sat, 30 Apr 2022 05:30:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkjQ6-0003CM-O0 for guix-devel@gnu.org; Sat, 30 Apr 2022 05:29:42 -0400 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]:59950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkjQ3-0003Kk-C3 for guix-devel@gnu.org; Sat, 30 Apr 2022 05:29:42 -0400 Received: from [192.168.223.254] ([188.189.162.235]) by xavier.telenet-ops.be with bizsmtp id QxVa27005552MzQ01xVaG7; Sat, 30 Apr 2022 11:29:34 +0200 Message-ID: <5150e37c32f636a50574359fb0d1a3fbfc836367.camel@telenet.be> Subject: Packaging rust crates without compiling dependencies again for every dependent (wasting build time) From: Maxime Devos To: guix-devel@gnu.org Date: Sat, 30 Apr 2022 11:29:25 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-qKLGJklttbLAubPTRSzm" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1651310974; bh=F6LAgAWdQgy3z/5AhKFW9qbRGc0I8/2nZIM0iSGSL+U=; h=Subject:From:To:Date; b=GqJgv91zAEBOHHuiXdtPj1MzxdHgjH9WEHxf0bslVL+Lc4TWRnQ2rC+qsjNwWrb4H rJpWXxkCLlECSriksjYeTd25UHdO3/Dz93Y6IJuI3ez4SeICWEXCEn+RWanNX1O1NI fjVFoyAykIwxnsi8BrAbjDK2kYR77YoNjwTVBt+CX4RjUphA50diV5KzTkqTTY5gAu CJzhh2mcLqeiHBPvnrWc1lLjuQ2Jr/OpPigFqjWMOPahSgnhkCJfJdcOBHQdNS00or kCtS5xcFhvOHOWNeydaI7Vu3eiMwprDvbquq69EVFYfMk/FNS6PtP/C7EXjVrCrNGL JtIHrvzcJ+alw== Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651311042; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=F6LAgAWdQgy3z/5AhKFW9qbRGc0I8/2nZIM0iSGSL+U=; b=pI4lZQ74j96fdXZHz0MdkeTldG78jZ0WyuohytEmVbHB8T2Asrjci6sPwlVAmO+UgYbgbL u1GjadxAQOm9QnGUt2lVq2pfASNKDzxyKabwHvs/3zsi+5y2xJFyAUwGJD56TzDvCCvrgv SldBpxkv2R6SSOeGHrSD1S3lwJBth8qrxGlSp3xIYmkLstxMbHQLmAmJ01fDqPHugvU0fW As3Ih4wqM5PN3/baklyp9Wh5s0RSkC22xAeR+fABoWIhPqpwUTiyAzDR/i6vNqGJdiGcfc 1zTVHaP1BLCS24wRw0exDc8HTxc9tZg9sJEk3SalhR0hQsdd31mHRDdgp8mJGw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651311042; a=rsa-sha256; cv=none; b=iRQRP5z2HGaI0T3kyMbwiu8ElAsZEocE8yWlk5ngNm0tiBQf6+lEd8KDfYL3qwKJZ/unwv us6BdDw/OAOHWFFmL+Epn7nidNtSrbb9IFFT8nkbX2ezcgvys8CswwtKPvd9/AQKqycwxr gYiHdG0S93t9Of9gt/oymWFXwU9UaOK1CqPmVdfdz0TJx82G3O8iicnoGa2a7qbv4BXvB4 eIqHu3ZQigHVnR7yycRn1r/lgOFwfib8DtZ9HRaU3VgY3lnTYWUY0Widxj6UjXB2FAy4hI TSB11qbxgFxL+d8Zmemxc3Jf858sq9bU1P4klF9yG9+ViK4eKG9O3Vk4rUeBtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=GqJgv91z; dmarc=pass (policy=none) header.from=telenet.be; 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" X-Migadu-Spam-Score: -7.70 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=GqJgv91z; dmarc=pass (policy=none) header.from=telenet.be; 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" X-Migadu-Queue-Id: 8FEBE17111 X-Spam-Score: -7.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: CNGNqC1wH0pB --=-qKLGJklttbLAubPTRSzm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi various distributions packaging rust things (^), Currently, most (all?) distributions seem to package =E2=80=98source-only crates=E2=80=99, which when =E2=80=98compiled=E2=80=99, just copy some sour= ce code to a location. This works, but the downside is that if both a package X and a package Y depends on rust-Z, then rust-Z will effectively be compiled twice: when building X, but also when building Y. This seems a waste of compilation time to me, so I've been writing a build tool =E2=80=98antioxidant=E2=80=99 (*) for the distribution Guix that= avoids double compilation, at ). To avoid the double compilation things, antioxidant calls the underlying rustc by itself instead of cargo, and it reads and interprets Cargo.toml by itself instead of letting cargo do that. Currently, it's rather Guix-specific, but in principle it should be possible to turn it in some binary 'antioxidant' that could be used on other distributions as well if someone is interested in that, e.g. something like $ # (not implemented yet!) $ antioxidant configure --prefix=3D$HOME/extra-software -Lcrate=3D/usr/lib/= crates -L/usr/lib -Lcrate=3D$HOME/extra-software/lib/crates --features=3Dx,= y,z $ antioxidant make $ antioxidant make check $ antioxidant make install DESTDIR=3D... # this does not install source cod= e, only the compiled crates (*) A =E2=80=98build system=E2=80=99, in Guix terminology. Currently, it can succesfully compile 'hexyl', 'sniffglue' and all their dependencies. I'm working on addressing limitations that prevent antioxidant from compiling other binaries (currently trying to make 'agate' and all its dependencies compile). Greetings, Maxime. (^) If you are reading this from guix-devel@: some of the distributions I intend to contact have a no-crossposting policy, so I'm first sending this = to guix-devel@, then sending some mails to individual distributions with a lin= k to this e-mail. --=-qKLGJklttbLAubPTRSzm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYm0BdRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jCaAQCjI+6YFVWXaw7VOZOHr6kIxAAi 6lU/E+7Nj1nG8AtlCgD+MvQ0zDaK5WxD38yr4GbmRZTEPDA53uQ3hz1hltODNAw= =pRvl -----END PGP SIGNATURE----- --=-qKLGJklttbLAubPTRSzm--