News for hackers. Stuff that matters.
Re:First Rust Code Shows Up in the Windows 11 Kernel by CGamesPlay on Saturday May 13, 2023 @01:36AM (#35925899)
I agree with this but the ownership model is really a huge learning curve for somebody who wants to make an application where it's OK if it crashes when there's a bug.

It would be cool if there was a "relaxed rust" which provided interop with standard rust, but used some designated smart pointer for everything automatically (at the crate level, for example). I'm not sure how/if this could work, but I think it would make transitioning from GC languages -> Rust much easier.

Re:First Rust Code Shows Up in the Windows 11 Kernel by hgomersall on Saturday May 13, 2023 @01:57AM (#35925993)
You can more or less do this - just wrap everything in arc mutexes and clone everywhere (or use Rc for strictly single threaded). I'm sure someone will point out where it doesn't work but I suspect it would work fairly well but with obvious costs.
Re:First Rust Code Shows Up in the Windows 11 Kernel by CGamesPlay on Saturday May 13, 2023 @03:03AM (#35926283)
Exactly, but I'd like to see it done automatically (possibly via a special glyph enabled via crate config?), so that users of this "relaxed rust" don't have to think about ownership at all, but can still participate in the rest of the Rust ecosystem, and there's a clear "off-ramp" to standard rust.
Re:First Rust Code Shows Up in the Windows 11 Kernel by ssokolow on Saturday May 13, 2023 @01:26PM (#35930543)
D tried that. The fact that so much of its ecosystem non-optionally depended on the optional garbage collection was part of what killed its chances for adoption beyond "like Java or C#, but without a giant corporation pushing for it".