From nobody Tue Sep 3 22:43:03 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 4Wz0yX60ZPz5MZKb for ; Tue, 03 Sep 2024 22:43:16 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wz0yX4Lk1z4Hfy for ; Tue, 3 Sep 2024 22:43:16 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-846bcf3677dso1212775241.1 for ; Tue, 03 Sep 2024 15:43:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725403395; x=1726008195; h=content-transfer-encoding:cc: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=ghku98spQJMnkMckQNVZI9D7dlsA3tR/AyiFs7JtqFE=; b=kBsmokx4hXeT6RfJqlXKnuZZUYtuDrW7qd5AmTjcOHOFHtw3EKX6KceikDZBbAKhCt gUEb8n2wRyJVFcMBKnz3bux0/02jpahqnKSt9hBP+nd/2f61fbU0fco002TciOST4CfA uMiF+1pFP9WXdfOx8jt2nsDOeggcPjSzpEK4TTazurbsVe3RY0cEKutRCqHxBgmGGJSv FNFQxT5bmVGFahY2rUgzHGFNbSEKs/JNPoXH8VmA9EZ2lCV/EmNnqeJ0QZXUvoK2QJu1 sYvWODCyut6BmVKEaN4bhWktR+YdfFr3U1xL9Je9tpD9MC4w3JX19xtm/kLgMQjT60IJ +ZvA== X-Forwarded-Encrypted: i=1; AJvYcCWAeIBh2XiA0J9i5V4ItHAfLeYyiBwLtS6qT6DaZ1IkeRsla1NuHy6UNtI2s8W85AC+AoXAG0DySlIrTmm2OYI=@freebsd.org X-Gm-Message-State: AOJu0YyFJKBkCo6TxLUzF7eUhnk3dWalhVd2B8Pa6zKC5kAg5koYW1AF FeEB+KAuJdUp8zk/5WKMhV/2tVcT95nxwGojoopkvcyqxbt6lp5PjQEsAdIJ851ZKrP/dFUNj3N QPGfS3wQFc2dYantDYP3OCADUHNv0KA== X-Google-Smtp-Source: AGHT+IGIXjiPc1y15WMI36Yl+BwJNJXaL8OQ7lBT0UPY2DLFm+3y4Cp2+AcJeKrU+UnBPffBzQYJXN4WhH6s8qZK8b0= X-Received: by 2002:a05:6122:318a:b0:4f6:a5ed:eb11 with SMTP id 71dfb90a1353d-5009db5acffmr13422382e0c.8.1725403395270; Tue, 03 Sep 2024 15:43:15 -0700 (PDT) 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: <202409031532.483FW0If007252@critter.freebsd.dk> <99fe98c0974bc1778e26097eec3fc244@purelymail.com> In-Reply-To: <99fe98c0974bc1778e26097eec3fc244@purelymail.com> From: Alan Somers Date: Tue, 3 Sep 2024 16:43:03 -0600 Message-ID: Subject: Re: It's not Rust, it's FreeBSD (and LLVM) To: "Rein Fernhout (Levitating)" Cc: Poul-Henning Kamp , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Wz0yX4Lk1z4Hfy On Tue, Sep 3, 2024 at 4:32=E2=80=AFPM Rein Fernhout (Levitating) wrote: > > I actually think Rust could be an opportunity to modernize the FreeBSD > src. > > But if it is decided that no utilities found in FreeBSD will be eligible > for a Rust rewrite then I don't see why it should be part of src. > > I do think Rust is mature enough for adoption into src. These > discussions have been riddled with misconceptions about Rust (and its > use in the Linux kernel). > > Each FreeBSD release could just pin a stable release of the Rust > toolchain, it is common for Rust projects to have a Minimum Supported > Rust Version (MSRV). > Also Rust does have an extremely strong ecosystem. It includes gems like > the Serde serialization framework and the Clap argument parser. > > I would personally like to potentially see parts of FreeBSD rewritten in > rust. > I think it would invite much more contributors in the long term. > However I don't see rust rewrites happen anytime soon. And if we only > allow new programs in Rust to enter src then I don't think it is worth > the burden of supporting a rust toolchain (and its dependencies). +1. We have some utilities of subpar quality that could benefit from a rewrite, even if it must be in C. But it would be easier and less buggy to rewrite them in Rust. As a programmer fluent in both languages, I'm never going to waste my time writing new software (or rewriting old software) in C unless there's a very very good reason. However, the "only new utilities in Rust" limitation isn't completely useless, if it gives us the confidence to allow rewrites later on. -Alan