From nobody Fri Jan 19 18:24:25 2024 X-Original-To: dev-commits-src-all@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 4TGp1M4tkgz575Pk; Fri, 19 Jan 2024 18:24:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (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 4TGp1M2vCfz4bn0; Fri, 19 Jan 2024 18:24:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5ce9555d42eso930368a12.2; Fri, 19 Jan 2024 10:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705688677; x=1706293477; darn=freebsd.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=f0t7h/WGwFpAztwlYon7ZOur4glBqMyz4aJj06k74Cg=; b=RxaHAWC51wTGPkH9OVTA9qBGKh7avT/ZICTjs2vVDv5Q3e4qmPhmoFbPeOv7NnEAQh iGJxx17DhkqhREXgeJ4xI17bfEFxZ9pEcVHX1XvFw1070zwtVuujDJxd5G8aRp/qqtA7 qqX6c0JduINRXBfyecHQ2li1Gogvnln4ggPgZ4IXlscgcsThSlmsjZ42QpEPAB4o+z4Q 403KI1GG0iS3YNlHcN4qYRz4fI0xQ2eO8IXaNq0ADUFZXBp9y4Dgt6YipC5WnFsI87n8 PXmdHu8Kmp7E9hrEwVnKjAkBOo40NLCEL+mtNrgh6E3kmLpdOM2Qnpwo0XDQQetmw5dr XRdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705688677; x=1706293477; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f0t7h/WGwFpAztwlYon7ZOur4glBqMyz4aJj06k74Cg=; b=Vw8KVS2qERI9pbh7gD8Q6DF9HP0iT5bbfORlFylB/VXrp3DaQa3qi6V7sUQTX0PVDU Xk7n9p4lYA9aHWBjm6KRm7yvBDY5Bd3eJpQR4eBDSul3eE5dI93u7/CWvnparARl4Z0h 8kzdiOPw6yWVGkBlfoCwZxyPh5p7SOpasO124rE2eZCcsCoLvcH0EvlMIVo3O6XMllji KbYM5ga9ggxuHegsfM4RNIExNcZUXxp6/n9I74n18d8raydc6L3sOoJewIdDjLvvyPob tAFicLmCqssKZVzBy8s1Pfz54kT60+X5XycXvFwPSoyBHsjieYmpMAgm394+duH5MOyx XFyw== X-Gm-Message-State: AOJu0Yyc/L4Cz1hi0HiMkgl2FA0wgGQbR0RTh9HMGMXvlwGIIURtZdd0 9zmfgbAmwsRfITD6buNblml3I+gLd52xgWrQ65YLJ6b/UkZFF+Ei6Gp+c1vj X-Google-Smtp-Source: AGHT+IFYsb57ftHtn4drd82zMr32Q42qOmuPhMUSxUG7MttWQxZtixQxV7uSkl22X7FtHXuncVoikw== X-Received: by 2002:a05:6a20:3c94:b0:199:93de:f61f with SMTP id b20-20020a056a203c9400b0019993def61fmr331276pzj.34.1705688676687; Fri, 19 Jan 2024 10:24:36 -0800 (PST) Received: from smtpclient.apple ([2601:601:782:be00:5c74:acf5:5e74:533d]) by smtp.gmail.com with ESMTPSA id p17-20020a056a0026d100b006da2ee05031sm5469435pfw.117.2024.01.19.10.24.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jan 2024 10:24:36 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Enji Cooper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: git: 8bae22bbbe65 - main - fusefs: prefer new/delete over malloc/free Date: Fri, 19 Jan 2024 10:24:25 -0800 Message-Id: <2A5657AE-C55D-492A-9013-9CFE1F80ED9C@gmail.com> References: Cc: Alan Somers , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: To: John Baldwin X-Mailer: iPhone Mail (21C66) X-Rspamd-Queue-Id: 4TGp1M2vCfz4bn0 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:2607:f8b0::/32, country:US] > On Jan 19, 2024, at 10:15, John Baldwin wrote: >=20 > =EF=BB=BFOn 1/19/24 7:38 AM, Alan Somers wrote: >>> On Fri, Jan 19, 2024 at 6:56=E2=80=AFAM Alan Somers wrote: >>>=20 >>> On Thu, Jan 18, 2024 at 10:32=E2=80=AFPM Enji Cooper wrote: >>>>=20 >>>>=20 >>>>> On Jan 17, 2024, at 2:50=E2=80=AFPM, Alan Somers = wrote: >>>>>=20 >>>>> The branch main has been updated by asomers: >>>>>=20 >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D8bae22bbbe6571da9259e0d= 43ffa8a56f4b3e171 >>>>>=20 >>>>> commit 8bae22bbbe6571da9259e0d43ffa8a56f4b3e171 >>>>> Author: Alan Somers >>>>> AuthorDate: 2024-01-15 23:49:47 +0000 >>>>> Commit: Alan Somers >>>>> CommitDate: 2024-01-17 22:49:41 +0000 >>>>>=20 >>>>> fusefs: prefer new/delete over malloc/free >>>>>=20 >>>>> MFC after: 2 weeks >>>>> Reviewed by: kib >>>>> Differential Revision: https://reviews.freebsd.org/D43464 >>>>=20 >>>> Why not use smart pointers instead? >>>> -Enji >>>=20 >>> Only because this stuff all evolved from C code. Smart pointers would >>> certainly work. >> Actually, TBH it's because I'm not real great with C++. It's a >> difficult language, and after 2016 I stopped even trying to improve my >> C++ skills. Instead, I've been focusing on Rust. Even when I wrote >> these tests in 2019, I strongly considered using Rust instead of C++. >> In the end, the only thing that forced me to use C++ is because I >> wanted them to live in the base system, rather than in ports. >> I still dream about the day when Rust is allowed in the base system. >> If it were, then in addition to these tests, I would've converted >> gstat to Rust (rather than add sysutils/gstat-rs to ports), added the >> nfs-exporter (instead of putting it in net-mgmt/nfs-exporter), added a >> ctl-exporter (which is impossible to do in ports, so I had to do that >> one in C), and converted tools/regression/fsx in place (instead of >> putting in devel/fsx-rs). Maybe a couple of other things, too. Like >> ztop, or the geom-exporter that I have half-written. I've also been >> tempted to rewrite zfsd in Rust. >> Alas, I sense that there is little appetite for bringing Rust into contri= b. >=20 > Brooks' opinion is that to support Rust in base we probably need to requir= e > always using an external toolchain as otherwise we would need to keep two > copies of LLVM in base. Based on my recent adventures with this, I concur. Our version of LLVM in ba= se is not compatible with the copy rust needs, so rust would always need to b= e bootstrapped with world. It would need to be a full toolchain as well to build all of the rust target= s. Using llvm built for a single target would only function as the initial b= ootstrap toolchain. Finally, the bootstrap compiler (via rustup) has tight requirements around v= ersioning and is precompiled for the host. It turns into a nightmare if new s= yscall support is added or if compat support is required to run the binary=E2= =80=A6 We=E2=80=99d be better off importing golang instead of rust. HTH, -Enji=20=