Comment by ethin

Comment by ethin 8 days ago

6 replies

I did this (worked on an OS) from 2019-2022 or so, during college. Didn't get to user mode sadly. Did it in Rust because back then Rust was what I was really into. It was really fun! :) OS dev has always been fun/interesting :)

dvirbt 8 days ago

Absolutely, I learned so much from this project! Do you think I should make a new version in Rust?

  • vlovich123 8 days ago

    That’s your call to make but I think it’ll be easier to write tests for the trickier parts and avoid the memory safety issues you flagged as being your biggest annoyance by isolating into unsafe that’s better unit tested (+ maybe cover with Miri to double check the unsafe code is still sound)

    • dvirbt 8 days ago

      That’s a great idea, could’ve really improved the overall project structure

      • vlovich123 8 days ago

        I’ll flag one thing which is that the page table stuff mentioned is unlikely something rust can protect you against - if you set up the wrong memory mapping that’s a higher level logic bug that would make rust unsound and result in weird failures. Rust can only protect you within the bounds of the memory model it defines for its abstract machine.