From nobody Thu Jan 25 18:22:58 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 4TLThz6g1Vz57lyv for ; Thu, 25 Jan 2024 18:23:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLThz1lDTz47r2 for ; Thu, 25 Jan 2024 18:23:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.167.53 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5100c4aa08cso3532662e87.2 for ; Thu, 25 Jan 2024 10:23:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706206992; x=1706811792; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sWNMglRE+2ihOvYhORKuSqC4RPRE8bmxF7IB6jnsrKI=; b=klo+eRJT/RCB0Yv6d4ZKmyAio2q31aBwvvcMN2YdEkPsiWQNNnAPGERySRplHMYiEy RQoM9IvnedXGYVEMtsUU8Y18/SY2p0iPyeoTmJ4ZYvi3S4EDyh5z9fYcDg2F92p3FFrW f3fZkwa5jzZcXksJFvyRMtp3jNU9WsiYl0ivewh039AfXb1gHFqZRTrvJXFNfRwPHOwf +ycBVDYrQpfp+qcb5Yea31YW5iH61tCE1Zl9Av2Fwl5EheguoDDdXzsjyJKA5xd7L2LD fu3kUO2B0TUk9wPrV0q0bFo56E4BD4UCU5DZHXLDi2wEvBrGko9zR7vPiY8HnNUD64uJ C1pg== X-Gm-Message-State: AOJu0YxrxsPHoHQhVdylMNemu2mzwwEMVszzApK1sS956iciOb4tC8m5 /RETeFFodcPyEK1riUZPfVwXtj8BsmkWR/AWBnmKccv4sipPYngONrwp1w2viQ+idWtR9u136CI seMR92DdluRj/98uKLHW6c59Z/T59LoEH X-Google-Smtp-Source: AGHT+IHP+4QFxrPF7ERrZKb6Zyw5GoMVbvJFNY78ZZvi+/pu9pmnmiHX+hpjqUKeTieLw6WPUbljJ0+CATVRv1bKZoc= X-Received: by 2002:a19:7612:0:b0:50e:b2cf:4e20 with SMTP id c18-20020a197612000000b0050eb2cf4e20mr129955lff.24.1706206991626; Thu, 25 Jan 2024 10:23:11 -0800 (PST) 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 References: In-Reply-To: From: Adrian Chadd Date: Thu, 25 Jan 2024 10:22:58 -0800 Message-ID: Subject: Re: The Case for Rust (in the base system) To: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a6375d060fc945e8" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.32 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_SPAM_SHORT(0.58)[0.581]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.53:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.53:from] X-Rspamd-Queue-Id: 4TLThz1lDTz47r2 --000000000000a6375d060fc945e8 Content-Type: text/plain; charset="UTF-8" On Thu, 25 Jan 2024 at 07:20, void wrote: > Hi, > > Somewhat adjacent to this discussion - what I'd like [1] to see, as a user > rather than a developer, is a system-stable rust, so that if/when > something needs rust, it uses the system-specific version. > > Let's say when there's a new freebsd version. This has, say, rust v1.72. > It's not src-rust in that rust wouldn't be used to build freebsd source. > But the binaries would be there, selectable on freebsd installation, > much as one can select kern-dbg from the installer. > > Then in ports, one of the options might be 'use system rust' [X] > so avoiding the churn that happens constantly. > The challenge isn't necessarily rust though. As said before, it's the ecosystem of library code developers use to build software. I've been playing with rust a bit for resource constrained embedded systems code, and there's only so much you can do before you have to import something and then ... dependencies can blossom if you're not super careful. You also don't want to be stuck where the system version of rust can't compile the updated crates. The supply chain issue is also super valid. A lot of stuff just "assumes" they can download stuff from the internet during build, and for companies that wish to avoid said supply chain issues, they'll end up starting to build their own repositories of crates. And we'd have to do the same, since rust and its own set of base libraries only gets you so far. Then you hope (!) that you don't have crate versions that are different for each piece of software you're importing. (And I'm pretty sure any rust developers will riot if you try to say something like "rust in base for base tools, but no crates or only these subset of crates that we check into vendor/. They'll end up wanting ... more. :-) (To echo phk, I kinda feel like this is a perennial issue of languages being in that fun triangle that poor devops folks have to be responsible for when integrating into something more .. formal. :-) -adrian --000000000000a6375d060fc945e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, 25 Jan 2024 at 07:20, void &l= t;void@f-m.fm> wrote:
Hi,

Somewhat adjacent to this discussion - what I'd like [1] to see, as a u= ser
rather than a developer, is a system-stable rust, so that if/when
something needs rust, it uses the system-specific version.

Let's say when there's a new freebsd version. This has, say, rust v= 1.72.
It's not src-rust in that rust wouldn't be used to build freebsd so= urce.
But the binaries would be there, selectable on freebsd installation,
much as one can select kern-dbg from the installer.

Then in ports, one of the options might be 'use system rust' [X] so avoiding the churn that happens constantly.

The challenge isn't necessarily rust though. As said before, it= 's the ecosystem of library code
developers use to build soft= ware. I've been playing with rust a bit for resource constrained
<= div>embedded systems code, and there's only so much you can do before y= ou have to import
something and then ... dependencies can blossom= if you're not super careful.

You also don'= ;t want to be stuck where the system version of rust can't compile the = updated crates.

The supply chain issue is also sup= er valid. A lot of stuff just "assumes" they can download stuff
from the internet during build, and for companies that wish to avo= id said supply chain issues,
they'll end up starting to build= their own repositories of crates. And we'd have to do the same,
<= div>since rust and its own set of base libraries only gets you so far. Then= you hope (!) that you don't
have crate versions that are dif= ferent for each piece of software you're importing.

(And I'm pretty sure any rust developers will riot if you try to = say something like "rust in base
for base tools, but no crat= es or only these subset of crates that we check into vendor/. They'll
end up wanting ... more. :-)

(To echo phk= , I kinda feel like this is a perennial issue of languages being in that fu= n triangle
that poor devops folks have to be responsible for when= integrating into something more .. formal. :-)

-adrian

=C2=A0
--000000000000a6375d060fc945e8--