From nobody Wed Sep 04 22:15:22 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WzcHy3hBYz5VV1x for ; Wed, 04 Sep 2024 22:15:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WzcHy1dkPz4r6w for ; Wed, 4 Sep 2024 22:15:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id lwFYsS9cx9TOUlyHdsbwEG; Wed, 04 Sep 2024 22:15:25 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id lyHbsjDAuKHV8lyHcsnL0F; Wed, 04 Sep 2024 22:15:25 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=XeEqz555 c=1 sm=1 tr=0 ts=66d8dbfd a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=EaEq8P2WXUwA:10 a=tBXV8v6mAAAA:8 a=WRJ6V7hQAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=KYWzlS4NUXJUcX199jMA:9 a=CjuIK1q_8ugA:10 a=7GshWI0fspEqwfknWyrY:22 a=1zxpBTYGrzRwGOqLqlOP:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 95783395; Wed, 04 Sep 2024 15:15:22 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 63E0366; Wed, 04 Sep 2024 15:15:22 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jan Knepper cc: Mark Delany , freebsd-hackers@freebsd.org Subject: Re: Rust: kernel vs user-space In-reply-to: <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com> References: <0.2.0-final-1725440949.866-0xb4bb20@qmda.emu.st> <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com> Comments: In-reply-to Jan Knepper message dated "Wed, 04 Sep 2024 06:56:12 -0400." List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Sep 2024 15:15:22 -0700 Message-Id: <20240904221522.63E0366@slippy.cwsent.com> X-CMAE-Envelope: MS4xfLZRe4OY5h8nwqm+lEBN32SaBLdcNUgb4zAVVAAqZy+kIRW74JJfRL8wZOq4ptn0ifWlSSYhq+cITNZqKpUo29V/S19ZbAOP3nza9HccdP7rZ4P74/dr TYEYZQ5bXNEzCWXAmQCXH4ClNb2FVyVV+bA/VnshuHDaG7EZ/PpfTsTaetDNi+rBz86jnNkun96AKdcmc2I7+aAjx3rX4u66GV4ruavnN5vlGMB5r9AqhpoA PTIp2HdVeJOu3KTD2Hc6+qYfcA4yBTTKhLIGrkl2iFs= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4WzcHy1dkPz4r6w In message <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com>, Jan Kneppe r writes: > D > > www.dlang.org The problem with D is data structure definitions need to also be mirrored (duplicated) in D. For example, when 64-bit inodes were implemented D failed to build and generate any code. The reason for this was ufs/ufs/inode.h now defined 64-bit inodes while the D representation as provided by the D language were still 32-bit. I had opened an issue with upstream regarding this. To this day they still haven't figured out how to implement 64-bit inodes on newer FreeBSD systems while maintaining 32-bit inode backward compatibility on older FreeBSD systems (as FreeBSD implemented this using ifunc). -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 > > > > ManiaC++ > Jan Knepper > > > On Sep 4, 2024, at 05:09, Mark Delany wrote: > >=20 > > =EF=BB=BFI hesitate to step into this discussion but is it worth making th= > e distinction between > > Rust in the kernel and Rust in user-space? > >=20 > > I can see the argument for introducing a "safer" language into the kernel a > = > nd there are > > very few candidates available: perhaps only Rust, C++ and Zig. Clearly if t > = > hat step is to > > be made, it probably should pick one language and run with it. > >=20 > > That's one discussion. > >=20 > > As for user-space, I find the rationale for Rust as the one-true-language-= > after-C far less > > compelling as many CLIs and server programs can just as well be written in= > more accessible > > languages such as go or perl or java or... > >=20 > > Frankly I no longer write any CLI or server code in C even after decades o= > f doing so > > because the trade-off between development costs and performance is far les= > s compelling in > > user-space. If my once-a-week invocation of a command requires a bit more m > = > emory and CPU > > than one written in C, is that really important compared to how much easie= > r the command is > > to maintain and enhance? > >=20 > > Point being, on the matter of introducing Rust to FreeBSD, I think the dis= > tinction between > > kernel and user-space is worth keeping in mind as they are quite different= > problems. > >=20 > >=20 > > Mark. > >=20 > >