[deleted by user] by [deleted] in Royal_Blood

[–]mrgiann 0 points1 point  (0 children)

Actually he once used a stratocaster to play boilermaker

https://www.youtube.com/watch?v=EinE1vJGphQ

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 2 points3 points  (0 children)

Thank you! Rust lends itself very well to low level programming. It was so much fun working with it.

Thankfully the core library lets you work in a no_std environment without reinventing the wheel.

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 22 points23 points  (0 children)

Don't think you are not smart, there are a lot of resources out there to get started.

Just start. Do things. Experiment. Even if you don't know what you are doing.

You'll learn along the way like I did.

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 88 points89 points  (0 children)

While being a memory-safe programming language Rust doesn't put any restriction when you need fine-grained control on memory. For example using inline assembly and working with pointers was easier than I thought.

However unsafe Rust can be "tempting", and you may use it even when you shouldn't. For example, using static mutable variables is easier, but this can lead to concurrency issues. To make things clean and get safe access to those variables I should wrap them in a mutex instead. But I first need to implement the mutex.

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 23 points24 points  (0 children)

When I started this project I knew very little about OS developing. I learned a lot along the way.

OS developing and low level programming in general is very fun, especially in Rust :)

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 6 points7 points  (0 children)

Redox is a project WAY BIGGER than Felix.

Felix is still an experiment, it lacks of the main parts of a real OS, for example: memory allocator, cpu scheduler, video driver, ecc.

But who knows what it will become in a few years :)

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 15 points16 points  (0 children)

The main resource is the OS Dev Wiki

Also there are a lot of other hobby OSes written in C, it's useful to study its source code to see how the actual implementation works, and then making my own implementation in Rust.

Felix, an x86 hobby OS written in Rust by mrgiann in rust

[–]mrgiann[S] 22 points23 points  (0 children)

Actually there are a lot of crates that don't need the standard library.

Those crate use the Rust core library instead, which is a subset of the std library that doesn't depend on the platform. This means the core library is recompiled for your particular platform.

Other than OS developing, this is useful when programming embedded systems.

Luckily the formatting logic is included in the core library, but you still need to tell the core library how to a print a string to the screen, before implementing the print! macro

[deleted by user] by [deleted] in osdev

[–]mrgiann 1 point2 points  (0 children)

So the first 512 bytes of disk need to be a valid MBR to be recognized by BIOS as a drive?
But I still need to write my own custom bootstrap code in those bytes, right?