From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YKtkOmhnTWJHoAAAgWs5BA (envelope-from ) for ; Wed, 06 Apr 2022 12:11:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MEvPMmhnTWKSgwEAG6o9tA (envelope-from ) for ; Wed, 06 Apr 2022 12:11:52 +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 658033EF8 for ; Wed, 6 Apr 2022 12:11:52 +0200 (CEST) Received: from localhost ([::1]:48380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nc2dj-0005YQ-Ko for larch@yhetil.org; Wed, 06 Apr 2022 06:11:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc2d6-0005Vu-AF for guix-devel@gnu.org; Wed, 06 Apr 2022 06:11:12 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:34716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nc2d3-0006ro-Du for guix-devel@gnu.org; Wed, 06 Apr 2022 06:11:11 -0400 Received: from [192.168.164.254] ([213.119.191.183]) by baptiste.telenet-ops.be with bizsmtp id FNB32700R3xs7P101NB4jS; Wed, 06 Apr 2022 12:11:04 +0200 Message-ID: Subject: Re: Building hexyl (a rust app) without cargo, with antioxidant-build-system From: Maxime Devos To: raingloom , guix-devel@gnu.org Date: Wed, 06 Apr 2022 12:10:59 +0200 In-Reply-To: <20220406002829.3f48dd37@riseup.net> References: <6312dfb8-b33f-125f-85e8-2fbe19ee1b87@brendan.scot> <64447e47f2f6233f4542783d3943a61ffbfc4618.camel@telenet.be> <20220406002829.3f48dd37@riseup.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-/53wvp6mkYwrYnn8EMRZ" 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=1649239864; bh=U86+edT1Lu0L3PxzZ8zQHEzuhtt321GAJPTYIDc+EGk=; h=Subject:From:To:Date:In-Reply-To:References; b=ICX9OqrYU+1ByKRpnKIs2CPW5w6h44O6sqQYi0t0NSL9Bf+qm4oj69t88l3WxxvCP S7jHf8+Qsrb97FWkSALkXOOzgJ3dRATSMzblTiLuHVPddvhpQa9fQvyBDxHf0pIo/j No+pwa3zlpCOvvLWGsMBhh9MotkBV2+T+yxEKTyXZRkFoFz7sGmXY0d8E8QeLcGDYZ Q0v++mTIIBXAl/opU8n6xjcHZPFxVpa+uNkw8E6iCCXjsJThiv2A8dY3/s5nazgq4w Xb6n3W6jdSBRFTY5NeIf8TYwBjTDUG2anazDyfqAuKHCmgj73SFwFuMwjNlvfVommo FDKFpRL+Q2vhw== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.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=1649239912; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=U86+edT1Lu0L3PxzZ8zQHEzuhtt321GAJPTYIDc+EGk=; b=OBhH4yf7+8/W/b5Z7DMmQpcV87xdcHuu2e5plED6Ioxn5NSBH6uG+rPWF/vGh7NGgHyE+8 oOVVt13EjbVdxI91jeNy3qYtlUqULwDxkN+OtNK7i6l2HWVT9Ambgj2pUeSgd3y4O70fhs VBxYDaUdP1YD6dbE2dUdHQufBg/20/VIoqOYEoENe1y3ZOjBLjuwcohgLZAha3Fpi9KkOw rnJTGlg9i6ktJKi+j7lMQ7jvVBXWjvfhTr7jimNciqtcIj8TPly5H2oSlnSH6RbFVJJxLV D0Kxp/Cum6Fym8Xf210XMkL2OZgkJb4k9sY5ITDSGrUDSyZO+MX8EIPMviRLEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649239912; a=rsa-sha256; cv=none; b=rKQ4+luNfDqx2NXP/kUoWXKvzrzaqOMu/uYKmVxNyR8yCj9biCARXVh8nwYw8+hTU6tHzc 3G3nn/wyAclK0mo3c9eNlVArbRNsDBELRbBU+fzcW9tnqjrKV6X/JUIS5AG3vvZZ8oSci/ lp/m4jpu0EOJ6pTiAIJ0aTbOGUro+WFLdOYZ/SbgH4JEoaSwz9MBEOohCZJ1zG8M01TBse M4cebfM66EP5yG2XuPFDyNdbL1I61CvqGztSw0n+BAqY2M8upJJul36FFXl9abr+kNAP2S MQiQNyCbx9g0TeoS53fDKFW8iKAGMzqisFHG5SEE8cpYPM3k0dR+FTU6VdyE/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=ICX9OqrY; 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: -6.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=ICX9OqrY; 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: 658033EF8 X-Spam-Score: -6.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: FEjcM9aTg2a1 --=-/53wvp6mkYwrYnn8EMRZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable raingloom schreef op wo 06-04-2022 om 00:28 [+0200]: > I'm also a bit worried with the trend of Guix trying to duplicate > functionality already present in language package managers and config > file formats. It creates a two-sources-of-truth situation. For service configurations, there is only one source of truth: the configuration record. It just happens to be converted to another format. The underlying file format, TOML is not Cargo-specific (https://toml.io/en/) and parsed with python-toml, presumably python- toml parses it correctly. (Whether antioxidant-build-system interprets it correctly, is of course a different matter.) Also, Cargo is both a package manager and a build system. The package manager part is useless to Guix, we even have to work-around it (see e.g. patch-cargo-checksums, crate-closure). Unfortunately, there does not seem to be a way to only use the build system part of Cargo and ignore the package manager part, so the build system part has to be reimplemented ... > Trying to keep one up to date with the other can be an issue, this is why= I > didn't create a custom record type for Yggdrasil config files and just > used a generic JSON converter. Which paid off, since there were in fact > changes in the config fields between versions. The configuration record fields does not have to support every new thing, it just haves to be _sufficiently_ up to date for users. And if a configuration field that's needed is missing, then it's almost trivial to add it. Additionally, some services have an 'extra-content' escape hatch.=20 yggrasil-configuration could have one too, then the user could have both write most things as Scheme (benefit: largely unified interface, more automation possible) _and_ be able to use the latest features not yet directly supported by the configuraiton fields, via the escape hatch. > Will this build system avoid that issue as well? antioxidant-build-system is a build system, not a configuration format. I've found that most Cargo.toml are rather tame. They often just set: * name * Some metadata like version, authors, home-page, include, exclude ... that antioxidant-build-system doesn't need. * sometimes 'build' or 'path' * dependencies / dev-dependencies / build-dependencies, also unneeded by antioxidant-build-system (the importer might need them, but that's a separate component) Looking at , there are some more things are things that antioxidant-build-system doesn't need: * resolver * badges, [[bench]] * the [patch] and [replace] --- just use a variant package in the package inputs Now, there are some things that aren't yet supported by antioxidant- build-system but probably need to be: * autobins / autoexamples / autotests / [lib] / [bin] / [example] / [links] * setting various environment variables before build.rs (there's probably some list somewhere ...) But aside from that, it seems that the essential parts of Cargo.toml are rather tame and unlikely to be added to. And if something essential is added anyway and needs to be supported, then it should be easy to modify antioxidant-build-system appropriately (long-term) and/or work-around it by setting some environment variables locally or maybe some substitute* (short-term). > I guess if the data it operates on has truly stable semantics, then > writing an independent implementation is not as big a problem, since > once written and debugged, it won't need to change. > (And getting rid of cargo would be nice for Rust dev on Guix.) AFAICT, the parts important to Guix are sufficiently stable -- not immutable (sometimes changes do happen). And even if it was unstable, it still seems much better than just using Cargo (due to much shorter build times, less strict about versions, not having to add winapi crates when compiling for Linux, no copying tarballs around, no #:cargo-inputs instead of [propagated-]inputs ...). Greetings, Maxime. --=-/53wvp6mkYwrYnn8EMRZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iIwEABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYk1nMxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uhTAQDprk6/DCDzabcKHD5xKFlIF8I0 /UZK3PNrvrTK/JHwKAD4qCH5XYZCvov6HFfgOpx9x2f1uwNtjqwCYhMdUoxjAg== =Zqg9 -----END PGP SIGNATURE----- --=-/53wvp6mkYwrYnn8EMRZ--