From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UFGhEum6TWJXAAEAgWs5BA (envelope-from ) for ; Wed, 06 Apr 2022 18:08:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EHTAC+m6TWJFPgAAG6o9tA (envelope-from ) for ; Wed, 06 Apr 2022 18:08:09 +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 D6F008DE9 for ; Wed, 6 Apr 2022 18:08:08 +0200 (CEST) Received: from localhost ([::1]:53766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nc8CV-0002Lq-Mg for larch@yhetil.org; Wed, 06 Apr 2022 12:08:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc8BZ-000262-Vj for guix-devel@gnu.org; Wed, 06 Apr 2022 12:07:10 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:44566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nc8BW-0002ZX-0A for guix-devel@gnu.org; Wed, 06 Apr 2022 12:07:08 -0400 Received: from [192.168.164.254] ([213.119.134.102]) by albert.telenet-ops.be with bizsmtp id FU70270062CjNND06U70du; Wed, 06 Apr 2022 18:07:01 +0200 Message-ID: <4e198c7a648a856d9a9bb5ff77b7b7ce39a4ef16.camel@telenet.be> Subject: Re: Building hexyl (a rust app) without cargo, with antioxidant-build-system From: Maxime Devos To: Hartmut Goebel , guix-devel@gnu.org Date: Wed, 06 Apr 2022 18:06:53 +0200 In-Reply-To: <6d712d02-db4f-366c-3d44-5609b103a971@crazy-compilers.com> References: <32ae0e474e295fa7f7052abd1bbb8053d2fddf16.camel@telenet.be> <36c1a8dcb363f8780b45156058ea606d0dd50854.camel@telenet.be> <547b56ea0a2a714029415385abaaed726fd02074.camel@telenet.be> <6d712d02-db4f-366c-3d44-5609b103a971@crazy-compilers.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-k5nUB1ArJHr5OkA7bsrh" 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=1649261221; bh=f5usEwwp3t3nx/AYxFgfgsJTH5IdFbLnPcST/SVN0eM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=oa7vN0nXtSSbWe6fvEH3W4rFsukNUJjPo5G5TjjYmUdEjX63Qsr9FYtJAvnFa90zD LNSZOzEwPUPS/FS8uAqwRU90rZU6q2QUwoYH2sez500hBtT4l8GcjBO2dLAQLH/ZBS +3uuDGUb9/jhnKH0cuiWesHynCbvGDSGlqEKK7XUMIeQPbm0/Hy8PZj4brgZAdNAuc UmOIXwhKT1wpOZ5x+taz+OgpyyF7/WoYOz1gjeuqAYjVH3ewR1Q62D8ruXBlwEAMNT ZZardrz74PSgiZUgYJNHwU2wjzhCJpHV/FODpRf7HjfqNBm+Vr5o5aNmUN3QRoYkFv /IGlJnxOluMYw== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.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: , Cc: Martin Becze 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=1649261288; 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=f5usEwwp3t3nx/AYxFgfgsJTH5IdFbLnPcST/SVN0eM=; b=Iq6/B4ucdHGWZgLJqjCPk9U0JrjlmL50jjgZSTmqtHzqe3VT8fyvdoHUfLJWNWYtGy4aHo gOtqn08wkOIMsJI4407FcEr9ybeB4Y05zHxyw28VcQC9gmImBbjhP9mXWLLn8SgSI3rpNZ nZDGsov/xejls+JN5kWFBnaxpqr5FVIe9KZan2g4Cf3O63jJfGnxzZ0kUCUrQ+IRDeDkoH E5cPfzQw8LDyQZE9iFBNW5dsybou5+oPUdCauPG+8cKDkALpAgrgc9aOHAANNZTfIVWvJd hVvMKXnqAi0wV5zBYSkPsYtS1tMb+bDWxEelp04QOzDRDiEt0tmc3R0I8Haywg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649261288; a=rsa-sha256; cv=none; b=MN7zkf8+apkXZ8v4ShUlDfMvTC+Ea71vrdC4Sory53yWGH0FijIhCxVY4kspAejeSt6MKx QkuLP7HeOFv4ZCLV30Vwuca4O2yJIvWLRn2BVvtIKE4z8mcIV6bZKBv+dw8ILHgm1Anir4 IBR/wgNB1F1Ivq3+KpC6PPgzCDC19Gof7OQ9Ja88dyiQKuYvu9xsajrTSeSGd5s63pW9et iwT4CQQyyoK+cXzOiGpD5xZCmQKuTPtBmrLEe9EVSCvwRcGYKw0IpiXY3RwQbEQoHhJTzu w39e9Zs2IvtKjKDEI1OyEePOnchUp6Q2MHYKJoqnKqlBT2V3D6hN7sizSc62Dw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=oa7vN0nX; 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: -11.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=oa7vN0nX; 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: D6F008DE9 X-Spam-Score: -11.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7ejGgHpKTPbk --=-k5nUB1ArJHr5OkA7bsrh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hartmut Goebel schreef op wo 06-04-2022 om 17:49 [+0200]: > [...] > > =C2=A0=C2=A0=C2=A0 * Package definitions can request non-default featur= es to be built > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 anyway. > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A difference from cargo-build-system: fe= atures are set in the > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 package of the rust crate, not the packa= ge using the rust crate. >=20 > How is this intended to work? >=20 > Package 1 has features AAA (=3D default) and BBB. So a .rlib is build for= =20 > each feature (package1-AAA.rlib, package1-BBB.rlib) Or will one need to= =20 > define two guix packages (package1+aaa and package1+bbb) and make the=20 > build-system build the respective feature? >=20 > I personally would prefer the former. Thus package2 would pick up the=20 > pre-compiled rlib for the respective feature. >=20 > Rational: If there are more features to be combined, the number of=20 > packages to be build can a order of square. So defining all these=20 > packages becomes a burden quickly. This is a computer's job :-) The=20 > build-system could easily build all combinations. suffixing each rlib=20 > with a short hash over the feature names, My third solution: no package variants, no multiple .rlib variants. Instead, by default enable the =E2=80=98default features=E2=80=99 mentioned= in the Cargo.toml, and (manually) add the extra features to the package definition of the Rust dependency if they turn out to be needed by the dependent. This is like adding --enable-this --enable-that, ... to ffmpeg's #:configure-flags instead of building a variant of ffmpeg for each dependent of ffmpeg that needs a different feature set. So far, I have not encountered incompatible features ... Let's see if it will become a problem. Greetings, Maxime. --=-k5nUB1ArJHr5OkA7bsrh 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+4iGRcl7gUCYk26nRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tIdAQCyI0vKpPU5HysVWfI7Lyc1Tbzh 3O9oVO30ePlRU9qRIgEAoUxhGUL9fnS+rWBbb2lrZCsDYl8ArIpDqSq9NcoGpQQ= =wC66 -----END PGP SIGNATURE----- --=-k5nUB1ArJHr5OkA7bsrh--