351

Enter Maestro, a unix-like monolithic kernel that aims to be compatible with Linux in order to ensure wide compatibility. Interestingly, it is written in Rust. It includes Solfége, a boot system and daemon manager, maestro-utils, which is a collection of system utility commands, and blimp, a package manager. According to Luc, it’s creator, the following third-party software has been tested and is working on the OS: musl (C standard library), bash, Some GNU coreutils commands such as ls, cat, mkdir, rm, rmdir, uname, whoami, etc… neofetch (a patched version, since the original neofetch does not know about the OS). If you want to test it out, fire up a VM with at least 1 GB of ram.

top 50 comments
sorted by: hot top controversial new old
[-] anthoniix@lemmy.world 93 points 6 months ago* (last edited 6 months ago)

This sounds cool, but troubling because of its license. Trying to write a linux compatible kernel and licensing as MIT is basically asking to get railroaded by gigantic organizations. I hope they reconsider in the future.

[-] itsnotits@lemmy.world 52 points 6 months ago
load more comments (3 replies)
[-] sapient_cogbag@infosec.pub 14 points 6 months ago

Its a bit if an issue with the rust ecosystem in general tbh. Wish more stuff was copyleft >.<

load more comments (2 replies)
[-] itsnotits@lemmy.world 73 points 6 months ago

According to Luc, its* creator

[-] TheRealKuni@lemmy.world 26 points 6 months ago

Keep fighting the good fight. Syntax is important.

[-] victorz@lemmy.world 21 points 6 months ago

Yes. Thank you, "It's no tits"!

[-] IrateAnteater@sh.itjust.works 67 points 6 months ago

Ok, I'm out of the loop and I've seen this often enough that I have to ask; why do people always bring up "written in rust"? No one points out that a given project is written in C++/C#/python/ruby etc, yet we keep seeing it for rust.

[-] xantoxis@lemmy.world 107 points 6 months ago

If you want a real answer, it's mostly advocacy, the same reason Linux enthusiasts show up to every negative-sounding Windows thread to tell you to install Linux instead. And if it is less obnoxious, it's only because there's fewer Rust enthusiasts.

There are, also, advantages to a Rust implementation that you can claim simply by virtue of something being implemented in Rust, as entire categories of problem that cause C projects to hemorrhage security vulnerabilities simply don't exist for Rust.

But mostly it's people wanting you to be excited about and interested in Rust.

[-] IrateAnteater@sh.itjust.works 17 points 6 months ago

Is there something inherently safer with how rust does things, or is it just a case of it being new, so the vulnerabilities haven't been found yet?

[-] hperrin@lemmy.world 83 points 6 months ago* (last edited 6 months ago)

Yes, it is inherently safer than C. Unless you write code in an unsafe block, Rust will handle many aspects of memory allocation and management for you, and ensure their safety. It is memory safe and thread safe by default.

C doesn’t have any of these safety checking features, so it would be equivalent to unsafe Rust, but all the time. It lets you do whatever you want with pointers for example, including making them point outside of the memory bounds. In program code, this will cause an illegal memory access exception, but in kernel code, all memory access is legal. Therefore, you could write a driver that accidentally overwrites the kernel’s own code in memory. That would likely cause a kernel panic and bring the whole system down. Whereas, in Rust, you can only do that within an unsafe code block.

[-] wikibot@lemmy.world 9 points 6 months ago

Here's the summary for the wikipedia article you mentioned in your comment:

Thread safety is a computer programming concept applicable to multi-threaded code. Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfill their design specifications without unintended interaction. There are various strategies for making thread-safe data structures.A program may execute code in several threads simultaneously in a shared address space where each of those threads has access to virtually all of the memory of every other thread. Thread safety is a property that allows code to run in multithreaded environments by re-establishing some of the correspondences between the actual flow of control and the text of the program, by means of synchronization.

^article^ ^|^ ^about^

[-] magic_lobster_party@kbin.social 29 points 6 months ago

Rust has many safeguards against some common errors that may cause security vulnerabilities. It’s by no means bulletproof against all vulnerabilities, but it’s something.

[-] sentient_loom@sh.itjust.works 11 points 6 months ago

I only know the hype. But the hype says that Rust's ownership system makes memory usage much safer by forcing the coder to deal with data. Your values will eventually go out of scope, and you have to dictate when that will happen or else it won't compile.

...or something like that.

load more comments (7 replies)
[-] magic_lobster_party@kbin.social 56 points 6 months ago

Programmers are hyped about Rust. It’s a programming language that has a legitimate chance to replace C and C++ for performance critical applications. So any new project in Rust increases the possibility of a future where C and C++ are programming languages of the past.

[-] FlorianSimon@sh.itjust.works 28 points 6 months ago

The absence of shitty OOP language features is not what's holding Rust down, in my opinion. We've all seen the disastrous results of 00s-style OOP code in the real world. Java-style OOP is on the way out, thankfully.

I think the low adoption of Rust boils down to 2 things: 1 - The language is particularly hard to use. Not just because it is different, but the compiler is tough to beat. 2 - C and C++ are very entrenched at this point. This is the biggest hurdle.

I gotta say, from my personal point of view: the Rust community is incredibly zealous and hard-working. Something I have never seen for any other language. Everyday, you hear about somebody rewriting some huge piece of software in Rust. They might just succeed eventually, who knows?

[-] 5C5C5C@programming.dev 22 points 6 months ago

Whenever people complain that in Rust "the compiler is tough to beat", the real problem is that individual's mindset.

I had this problem as well when I first started playing with Rust. I thought I was very smart and that I know exactly what I'm doing when I'm programming, so if the compiler is complaining so much about my code, it's just being a dumb jerk.

But if you stick with it instead of giving into your initial frustration, you'll realize that the truth is the compiler is your friend and is saving you from innumerable subtle bugs that you'd be putting into your code if you were using any other language.

When you realize that the 1.5x time+effort you need to spend to satisfy the Rust compiler is saving you 5x-50x time+effort that you'd have to spend debugging your program if you had written it in any other language, you'll come to appreciate the strictness of the compiler instead of resenting it.

There's a reason us crustaceans are so zealous and the ecosystem is growing so rapidly, and it's not because we're super smart or have some unusually high work ethic. It's because the language and the tooling is legitimately really good for producing high quality software at a rapid pace.

There's going to be an inflection point where the people who keep dismissing Rust are going to be left behind by the entire tech industry because there's no other language that allows an ordinary developer to produce as high quality software as quickly that can work across EVERY platform, including web (via compiling to web assembly). I won't pretend I can predict exactly when that inflection point will happen, but it will definitely happen.

[-] FlorianSimon@sh.itjust.works 13 points 6 months ago

I do realize that the compiler is being annoying for my own good, you're preaching to the choir here. I've pestered about Rust being so unforgiving before, thought I was smarter than the compiler and realized the compiler was right, and been amazed.

In the grand scheme of things, though, I still think that this is slowing down adoption: trying the language is hard. Outside of the context of paid work which probably doesn't use Rust, when you're trying the language to work on small projects on which the 5x-50x figure probably doesn't hold true because the project is too small, the safety benefits aren't tangible, and writing the equivalent C++ will probably feel simpler.

To go back to the proficiency of the Rust programmers: you are entirely correct, I don't think Rust programmers have a God-given hard work ethic that other programmers don't.

Respectfully, though, I disagree with your statement that it's something about the language that makes programmers THAT many times more prolific, but I can't think of a solid explanation why at the moment.

[-] 5C5C5C@programming.dev 16 points 6 months ago

I've had the privilege of switching from C++ to Rust almost completely in my professional work. I can tell you in no uncertain terms, the language itself makes an enormous difference.

When I was doing highly concurrent multi-threaded programming in C++, I would sometimes have to waste entire weeks hunting down subtle data race bugs, despite the fact that I have a solid understanding of concurrency and multithreading. In some cases the bugs would originate in third party libraries that I was using, even though those libraries came from credible sources like Microsoft, Google, and GNU.

Switching to Rust, those bugs are gone. By the time my code compiles there's at 95% chance that it will work exactly the way it's intended to without any debugging. The remaining 5% is silly little logic accidents like saying if condition { ... } when I meant to say if !condition { ... } and those bugs are trivially caught by writing a few simple unit tests (and Rust also makes it easier to write unit tests than any other language I know of).

When I see my colleagues struggle with debugging problems in their JavaScript, Python, or C++ code, almost every time it turns out to be something that would've been trivially caught by the Rust compiler.

By no means does using Rust guarantee that your code will be completely bug free. But the language alone gets you so close to that goal that it hardly takes any special effort beyond compiling to get all the way there.

I think this is a huge reason that the ecosystem grows as quickly as it does: it's so easy to write code that you can feel confident enough about to publish for anyone to use that many people go ahead and do that, and others feel confident using the work of others because the compiler does so much to ensure quality. It creates a virtuous cycle where people can develop faster by taking advantage of other people's efforts and then release their own effort back into the community.

load more comments (1 replies)
load more comments (9 replies)
[-] devfuuu@lemmy.world 23 points 6 months ago

Because rust is the modern low level systems language, which means it gotta go fast without all the freaking problems of the only other real alternative so far that was C. The languages you list don't even play in the same ballpark.

[-] AnUnusualRelic@lemmy.world 22 points 6 months ago

But a kernel written in Perl would be a real achievement. Something in a whole different league.

[-] cd_slash_rmrf@programming.dev 16 points 6 months ago* (last edited 6 months ago)

It definitely would be. Next time someone posts a kernel written in Perl I hope they specify that.

[-] hglman@lemmy.ml 21 points 6 months ago
load more comments (1 replies)
[-] CaptDust@sh.itjust.works 18 points 6 months ago* (last edited 6 months ago)

Mentioning it's written in rust should imply this code base will have secure concurrency, better memory handling, be easier to extend, while maintaining near C++ performance. None of these are guarantees, but considering so many rust projects are "C/C++ programs, rewritten" it seems worth calling out as a differential. The language's advantages extending to the kernel make it an interesting project.

load more comments (1 replies)
[-] bacon_pdp@lemmy.world 25 points 6 months ago

50MB for a sub POSIX kernel and a shell prompt for a 50MB ISO image that has less functionality than a 4KB kernel (L4SEC) which has actual formal proofs of correctness.

Well, I guess it has Rust as a selling point but that isn't something that should matter if the goal is real security.

[-] kernelle@lemmy.world 35 points 6 months ago

Started as a school project

I wouldn't take it so seriously, it's a passion project from a person learning about Rust and OS structure. Don't compare this project against industry professionals.

[-] gian@lemmy.grys.it 14 points 6 months ago

Why not ? Even Linux started as a personal fun project. Let's see where it will go

[-] kernelle@lemmy.world 7 points 6 months ago

For sure, but making an OS is not a one man job anymore.

[-] shadearg@lemmy.world 11 points 6 months ago

Bah gaw. Terry Davis would say you "glow in the dark."

[-] kernelle@lemmy.world 7 points 6 months ago

I knew there would be at least one TempleOS reference in this thread lmao

[-] Armando3996@lemm.ee 8 points 6 months ago* (last edited 6 months ago)

Finally, some "exciting" news, 2031 will be the year of the linux desktop(and Maestro)!

[-] LainOfTheWired@lemy.lol 7 points 6 months ago

It's interesting, but with Linux and BSD already available in many different flavours do we really need it?

I mean what use case would it be better in except maybe an extreme rust enthusiast.

[-] killeronthecorner@lemmy.world 84 points 6 months ago

do we really need it?

Asked no programmer ever before starting a project

[-] WhyYesZoidberg@lemmy.world 9 points 6 months ago

If it’s cool (as this is), then yes. It’s needed :-)

[-] SSUPII@sopuli.xyz 32 points 6 months ago

It isn't needed to be required for one to like developing it.

[-] xantoxis@lemmy.world 22 points 6 months ago

With minix already available I see no reason why we need a Linux kernel

[-] AVengefulAxolotl@lemmy.world 6 points 6 months ago

Whats the need for it? Another great operating systems engineer emerging from it even though the project itself might not be 'useful'. You only truly learn stuff when actively doing it.

One day he might be a significant contributor to Linux!

[-] asdfasdfasdf@lemmy.world 5 points 6 months ago
  1. Memory safety is super important
  2. Rust is far more approachable than C, so contribution and iteration is easier
  3. Did we really need an OS when Linux was released? It wasn't the first.
load more comments (1 replies)
[-] tsonfeir@lemm.ee 5 points 6 months ago

But, but… rust?!!

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 03 Jan 2024
351 points (96.8% liked)

Technology

55692 readers
2658 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS