Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2024 13:36:54 -0700
From:      Chris <bsd-lists@bsdforge.com>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        Jan Knepper <jan@digitaldaemon.com>, Mark Delany <x9k@charlie.emu.st>, freebsd-hackers@freebsd.org
Subject:   Re: Rust: kernel vs user-space
Message-ID:  <be6ed80e5126d1a194635eca7f578e61@bsdforge.com>
In-Reply-To: <20240904221522.63E0366@slippy.cwsent.com>
References:  <0.2.0-final-1725440949.866-0xb4bb20@qmda.emu.st> <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com> <20240904221522.63E0366@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2024-09-04 15:15, Cy Schubert wrote:
> 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).
> 
Well, why about B?
https://en.wikipedia.org/wiki/B_(programming_language)

Sorry. I remembered using this *many* years ago, and couldn't resist
adding it to the list. :-)

--Chris
> 
> --
> Cheers,
> Cy Schubert <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
> NTP:           <cy@nwtime.org>    Web:  https://nwtime.org
> 
> 			e^(i*pi)+1=0
> 
> 
>> 
>> 
>> 
>> ManiaC++
>> Jan Knepper
>> 
>> > On Sep 4, 2024, at 05:09, Mark Delany <x9k@charlie.emu.st> 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
>> 
>> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?be6ed80e5126d1a194635eca7f578e61>