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 ms0.migadu.com with LMTPS id 0FkOLNnBRmKcDAAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 11:11:53 +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 gNGtKNnBRmJArAAAauVa8A (envelope-from ) for ; Fri, 01 Apr 2022 11:11:53 +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 5BD0016A18 for ; Fri, 1 Apr 2022 11:11:53 +0200 (CEST) Received: from localhost ([::1]:57446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naDJw-0008HZ-88 for larch@yhetil.org; Fri, 01 Apr 2022 05:11:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naDIe-0008GG-KV for guix-devel@gnu.org; Fri, 01 Apr 2022 05:10:34 -0400 Received: from [2001:470:142:3::e] (port=51768 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naDId-0005dg-4N; Fri, 01 Apr 2022 05:10:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=j6AyusPpgOPbwZe/p1BygKjZCog8B0ZKU37SC9yfOqY=; b=I5/rM5RrBIgZqfOyBd+j Wo6Vq9E5O6sG/+4lojoo2ftk3uvjg5BftVdrn5XSZqZy47i7Xqy6j3NSsagtfPpfIoUB9ULRXqBS+ GRriK+clfKeknt8lE5djV47CqMGl4UDzqbKxe8PqLi6ILmNPMS5uXjBgQ8AAValJ9oOUaBF8wnrZE QLJ5CJsAatNmpQEVly/IZevPiqdKAtvE/YUV7RMCy0TPzGmr6Q4Pl4trUZhUrjTZvqTTm0SfM8Ofl +MeYLDoSCoPNe3rKgP3t3UiWYUTT/AU3hfTGzjQB5HO5OwWJ/m+aUugrXHHbMJ2Ys4rHO7N+xQ8z6 rMuI1nk1t89IAA==; Received: from [193.50.110.173] (port=38546 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naDIM-0001f2-En; Fri, 01 Apr 2022 05:10:26 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: Compiling rust things without cargo (super WIP POC) References: <32ae0e474e295fa7f7052abd1bbb8053d2fddf16.camel@telenet.be> <36c1a8dcb363f8780b45156058ea606d0dd50854.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 01 Apr 2022 11:10:11 +0200 In-Reply-To: <36c1a8dcb363f8780b45156058ea606d0dd50854.camel@telenet.be> (Maxime Devos's message of "Thu, 31 Mar 2022 22:06:10 +0200") Message-ID: <87lewpnp8s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: guix-devel@gnu.org, 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=1648804313; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=j6AyusPpgOPbwZe/p1BygKjZCog8B0ZKU37SC9yfOqY=; b=Alsj1TcvwIzJEFXTOyVCA64YD+pAvrfi9PW9tYP47l1voFCK9YDU4OF5ke+VhnJQE4Atxs YT0iExWlA4U3AnNvLi97WYS9iQBlRWScWZAW7lh8wC4FRiMjXio9vYKCMLMs7GwuN2hUFi r240rlpvP359by2ojXLY3iLAxE9sWYYM2fPtwD54coNpgGm3HvsgZ05dVxeTZr/B4OOFWQ 6EN+PjK8k4dVqHdfn4ED/X+Wqi8b5qhiQpYL4XszzEnO8E2+qk7ot5bqFupjDsR0H5TwD8 2ZaLa/R4pfruYj+RevtW6hFBVvjTl2j8U09pR+7ytMOPQ/iWSsEISgHAKAp5nA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648804313; a=rsa-sha256; cv=none; b=NAp+kgz6shG2KOj+Jez4MMxD+4sM1W9OwPLA8mvPsEwwNG2wr2TazHMH8l7bfRr9OqyZNg v7i1lxJofvOjj0aEVZcyolldk8WjqaDJr1pvqshB2UAJeh76+9GiEobq75SavadTyobT94 VdkssK4/TOGdLW+6ZgquYo0Zwu7KKMXOsD3WDdUFT3xy1t95FctXPAs+lJCIaZX7iZxwur 5ZbzvNOYkwMXk0NRAjUKFGVPX+3V4RZbp57Wf3WSIKRLKXHZ43pknpSUzPQbPMvHbmVOYC 2tfp66NHCtkRmXBCaUrb+Ab0o15n9ShfN8pmUHuHESudNhf5/zx9H8oW+axKHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="I5/rM5Rr"; dmarc=pass (policy=none) header.from=gnu.org; 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.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="I5/rM5Rr"; dmarc=pass (policy=none) header.from=gnu.org; 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: 5BD0016A18 X-Spam-Score: -6.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: jo8VLfJ7olD5 Hi, Maxime Devos skribis: > I invite you to take a look at . > It contains a minimal rust library (libhello) and a minimal 'hello > world'-style application that uses 'libhello'. > > To simulate how Guix compiles C software (but here applied to Rust),=C2=A0 > the Makefile does the following: > > * Run 'rustc --crate-type=3Dlib libhello/hello.rs -o out/libhello/lib/l= ibhello.rlib', > to compile the library and install it in 'out/libhello/lib/libhello.r= lib' > (cf. /gnu/store/...-libhello.../lib/hello.so). > > * Run 'rustc -Lout/libhello/lib hello-app/main.rs -o out/hello-oxygen/b= in/hello' > to compile the application. By default, rustc will fail because it c= annot find > the library. However, if -Lout/libhello/lib is passed, then it does = find it! > > (cf. LIBRARY_PATH=3D/gnu/store/.../lib & gcc -L/gnu/store/.../lib) > > This is a rather basic example (no transitive dependencies, no test depen= dencies, > no macros ...), but it seems like there are some possibilities here ... Interesting. > As a next step, maybe I could try writing a Guix package definition for l= ibhello > and hello-oxygen, gradually making things more complicated (macros, trans= itive > dependencies, some non-toy Rust dependencies, a Guix build system ...)? I guess the whole question is whether that technique can be made to work for the vast majority of Rust packages. I=E2=80=99d suggest working in that direction: writing a build system as a first step, using it in all the Rust packages, and analyzing the kinds of problems encountered, with the goal of estimating the effort it would take to make it work for every single package. Easier said than done, I guess. Overall, I=E2=80=99m afraid Rust packaging is getting out of hands and we= =E2=80=99re all looking elsewhere. For example, that Rust packages live in their own separate world means there=E2=80=99s no tooling available, leading to poor = QA, a proliferation of versions of the same packages that never get removed, and so on. I think addressing that, for instance with something as I proposed in , should be high priority. Thoughts? Ludo=E2=80=99.