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 ONQvHhxqTGLd/QAAgWs5BA (envelope-from ) for ; Tue, 05 Apr 2022 18:11:08 +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 uFTSFhxqTGJDOwEAG6o9tA (envelope-from ) for ; Tue, 05 Apr 2022 18:11:08 +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 214E911523 for ; Tue, 5 Apr 2022 18:11:08 +0200 (CEST) Received: from localhost ([::1]:34584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbllr-0000kK-Af for larch@yhetil.org; Tue, 05 Apr 2022 12:11:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbllS-0000i7-Dd for guix-devel@gnu.org; Tue, 05 Apr 2022 12:10:46 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:52342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbllK-0007am-JK for guix-devel@gnu.org; Tue, 05 Apr 2022 12:10:38 -0400 Received: from [172.20.10.23] ([213.119.157.60]) by albert.telenet-ops.be with bizsmtp id F4AX2700D1JU6t9064AXxX; Tue, 05 Apr 2022 18:10:32 +0200 Message-ID: Subject: Re: Building hexyl (a rust app) without cargo, with antioxidant-build-system From: Maxime Devos To: Hartmut Goebel , guix-devel@gnu.org Date: Tue, 05 Apr 2022 18:10:19 +0200 In-Reply-To: <547b56ea0a2a714029415385abaaed726fd02074.camel@telenet.be> References: <32ae0e474e295fa7f7052abd1bbb8053d2fddf16.camel@telenet.be> <36c1a8dcb363f8780b45156058ea606d0dd50854.camel@telenet.be> <547b56ea0a2a714029415385abaaed726fd02074.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-fWB00rFZsW1W/s1kF8ok" 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=1649175032; bh=9NWW91DPzO7VHD8wJTkqmM8MNMQsaxQm06BVcVNqg28=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=dWb/XVoepv2IVfIQkpBTa142wL3JqMrpSWRUJH0e01GTTknX0RL97yqveWbCIJKu6 skX1nHVqWKiqHhj59XkufDITiITEVpJTvCWAPmcZER9E8fCyaupE4vh5FUGuEJGMEL YvtB+CgOFxxwnUtYT7evi93GG3glDE9fOBuay3aJAWqPykvGV23YlSm/EmeobC+vcx jH+LqZM7099323PISGDEpIdaDEenPqOX8baQpA89aaGsCF7L1CuGOtfN/bD8GqvJ5t lJTxk7u9K5/NMqSyccyLHqJo/QSBgCTuYIjtPIOVMENixaI5hrd4QTImE72F2wf4SW 9kNRAoGhRiruQ== 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=1649175068; 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=9NWW91DPzO7VHD8wJTkqmM8MNMQsaxQm06BVcVNqg28=; b=R9OogeoFDpmfOIieaAjNRGul0aZrCBfT5naaYj6Jz0spzFCJtnVHnaTa7G7syFlrTiI/NM sTrKnJc/bOsuF/Yx0Bx0r0HBWlD+mUYfrg94dea2HlScBLmxPTLSpKfNZBoHMATyRydK2K nsYxOk40OiAP9fBD6Jq/KlshRuJmRfOVyoDweyttgLZI0MHz6QQvF3Utv9rDqzkJrvKiu3 YW4KDRT7o2aTeKHz/Qs+aIMNkIOenLngTrj6mjFMTpag7ib71yt0xGEsuNyMLCdJUIvBW4 H7fmwX+joGzVjd5wm3NQGu5lHzHp1gRxvZns+pZi2YPOn7hnyn4dICF80VZaYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649175068; a=rsa-sha256; cv=none; b=qlEubH/x718MMez6mjW8dZdSw+5YWhA9uGi58fwN2nnsaGqN2GdkMjRGKrPv49zbcRxkBb j8T+xkkn3cic/4BsVW9RXCYDdkAVpsdXByhdUeGYWC/u5RhNu/hzURpaqOO3t9X/sdDNd0 0S3b5fdJAiHSNGf+Zg7TgVnilExReUzvV2gaPMS49qEGWv07BtHZoxkhXX/JxhqsCijl4q xHVM7JN+s6Efrsj2weW41wJSTnzVnKBU1l2YFhNSuzgH/AnGVE7pqW0pyJbgPSnNdiIQH1 Q8+2ioqBFnqnH7rQsSbxuirCxbED8EFmGhutP6pJtG05pRUK2EYDq/J8z8ryMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b="dWb/XVoe"; 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.77 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b="dWb/XVoe"; 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: 214E911523 X-Spam-Score: -7.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: r0duig3yPo3y --=-fWB00rFZsW1W/s1kF8ok Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op za 02-04-2022 om 17:18 [+0200]: > =C2=A0 * makes a few assumptions on the source layout (can be fixed > =C2=A0=C2=A0=C2=A0 by using more info from Cargo.toml) This has now been partially resolved. It now looks in Cargo.toml to determine where Rusts's equivalent of 'configure' (build.rs) is located, and the Cargo.toml can now override the default src/lib.rs. Some other improvements that weren't announced previously: * The code now automatically detects cycles and reports which packages are involved in the cycle. * --edition (cf. -std=3Dc11/c99/...) is set appropriately, depending on Cargo.toml, fixing some build failures. * All default 'features' (in Cargo.toml) are now enabled by default. * Package definitions can request non-default features to be built anyway. A difference from cargo-build-system: features are set in the package of the rust crate, not the package using the rust crate. * build.rs is now run, which reduces the number of features that need to be set manually. * proc-macro crates are now named .so instead of .rlib, apparently naming them .rlib even though they aren't .rlibs confuses rustc or something. * #[deny(warnings)] (rust's equivalent of -Werrors) is now ignored (FWIW this is done by cargo as well). * Conversion from cargo-build-system to antioxidate-build-system is now automated by a recursive 'vitaminate/auto' procedure and some ad-hoc cycle breaking. Some things that could perhaps be moved to (upstream) Guix: * Sometimes test and build.rs dependencies are listed in #:cargo-inputs and #:cargo-development-inputs (e.g. rust-quickcheck, rust-cc). I deleted the test dependencies (because they contribute to cycles and for now running tests isn't supported anyways). =20 Maybe they can be moved to #:cargo-development-inputs upstream (untested)? Extending 'check-inputs-should-be-native' would also be nice too ... * There's a cycle between rust-backtrace-sys and rust-cc can be eliminated by deleting build.rs and tweaking Cargo.toml, at cost of losing some support for Android (which is not supported by Guix except in the sense that Linux is supported). Greetings, Maxime --=-fWB00rFZsW1W/s1kF8ok 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+4iGRcl7gUCYkxp6xccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gT6AQDoqMVguWDmp2k7Ya/PPal7L74y BDOKJpHqqLkx95A8jgD/XiINl7Bv3/0r/vtHCcgDs/7brsLc3aNA9Wg1KjCJCQE= =StM+ -----END PGP SIGNATURE----- --=-fWB00rFZsW1W/s1kF8ok--