From nobody Wed Sep 4 09:09:09 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 4WzGs05gxZz5TTM6 for ; Wed, 04 Sep 2024 09:09:24 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [IPv6:2403:580c:e522:0:203:0:120:11]) by mx1.freebsd.org (Postfix) with ESMTP id 4WzGry5kJWz4g3K for ; Wed, 4 Sep 2024 09:09:22 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Authentication-Results: mx1.freebsd.org; dkim=fail ("headers rsa verify failed") header.d=emu.st header.s=2019 header.b=ER5aDvGX; dmarc=none; spf=pass (mx1.freebsd.org: domain of x9k@charlie.emu.st designates 2403:580c:e522:0:203:0:120:11 as permitted sender) smtp.mailfrom=x9k@charlie.emu.st Received: by f3.bushwire.net (Postfix, from userid 1001) id E709C4E670; Wed, 04 Sep 2024 19:09:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1725440949; bh=UJEUvqaqZLs/GhgTvLnYrrOE1qk=; h=Comments:Received:From:Comments:Message-ID:Date:To:Subject: Content-Disposition:In-Reply-To:References:Mime-Version: Content-Type; b=ER5aDvGXTzd6GqLhHol7AZClxZ1oBJ/AkmnvEMBlLXkbjwyO519mGPTGCJwx8pj0V rv3JE7HjoJThsKRWAm9Rwxtz2EvJw0tZpoOkvQrlU96fgLeDY+Ox5ajxL9KLFUHScd VhL57y20YKxnmxYbKCA9UiyygVYYs1F/Z+wa3wJg=wa3wJg= Comments: QMDA 0.3a Received: (qmail 49832 invoked by uid 1001); 4 Sep 2024 09:09:09 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1725440949.866-0xb4bb20@qmda.emu.st> Date: Wed, 4 Sep 2024 09:09:09 +0000 To: freebsd-hackers@freebsd.org Subject: Rust: kernel vs user-space Content-Disposition: inline In-Reply-To: <7533543.20240904114624@yahoo.com> References: <202409031532.483FW0If007252@critter.freebsd.dk> <7533543.20240904114624@yahoo.com> 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=utf-8 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.71 / 15.00]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.86)[-0.860]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.26)[-0.255]; R_SPF_ALLOW(-0.20)[+ip6:2403:580c:e522::0/48]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:4764, ipnet:2403:5800::/27, country:AU]; RCVD_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[emu.st]; DKIM_TRACE(0.00)[emu.st:-] X-Rspamd-Queue-Id: 4WzGry5kJWz4g3K I hesitate to step into this discussion but is it worth making the distinction between Rust in the kernel and Rust in user-space? I can see the argument for introducing a "safer" language into the kernel and there are very few candidates available: perhaps only Rust, C++ and Zig. Clearly if that step is to be made, it probably should pick one language and run with it. That's one discussion. 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... Frankly I no longer write any CLI or server code in C even after decades of doing so because the trade-off between development costs and performance is far less compelling in user-space. If my once-a-week invocation of a command requires a bit more memory and CPU than one written in C, is that really important compared to how much easier the command is to maintain and enhance? Point being, on the matter of introducing Rust to FreeBSD, I think the distinction between kernel and user-space is worth keeping in mind as they are quite different problems. Mark.