I've never programmed in Rust because I still have trouble seeing the point. It seems overly restrictive. A copy of any data has nearly zero marginal cost (and you can pay the cost by doing the work yourself), so in a free machine, it would have nearly zero price. If widely useful data is protected by the borrow checker, far fewer people will use it. It is easy to show that the total utility of a piece of data to the…
> A copy of any data has nearly zero marginal cost I don't think this is true at all. Reducing copies and allocations in my programs is one of the things which has speeded them up the most. > If widely useful data is protected by the borrow checker, far fewer people will use it. Are you also against private struct/class fields? Because they also restrict access to useful data. For me, the need for Rust is as a langua…
Writing an OS in Rust: Introduction to Paging
11–20 of 81 posts
Re: Writing an OS in Rust: Introduction to Paging
#12I've never programmed in Rust because I still have trouble seeing the point. It seems overly restrictive. A copy of any data has nearly zero marginal cost (and you can pay the cost by doing the work yourself), so in a free machine, it would have nearly zero price. If widely useful data is protected by the borrow checker, far fewer people will use it. It is easy to show that the total utility of a piece of data to the…
Re: Writing an OS in Rust: Introduction to Paging
#13As a side note: I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You can use massive Boost libraries and Qt frameworks on non-embedded systems with C/C++, but in embedded, there is no such luxury. I am new to it but it is painful and I wish to see a day where we have a complete LLVM based ARM compiler toolchain with Rust sitting on top. I think there were some blog posts abo…
You want someone to write a Rust RTOS? Or would it suffice for a vendor to release a BSP with Rust support? IMO your current RTOS vendor can (and should!) offer this. Lots of existing RTOS companies will vendor a gcc or clang toolchain for their customers. The fact that C and C++ are well specified independent of their implementation really helps, though. But the baseline rust toolchain already provides a lot of what's needed. They "just" need to offer integration with their C library, designate llvm triple(s), etc.
If your RTOS vendor offers support for C and C++ already, chances are you can write rust for your target already. Unfortunately you'll need to stick to no_std until that BSP shows up though. :)
Re: Writing an OS in Rust: Introduction to Paging
#14As a side note: I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You can use massive Boost libraries and Qt frameworks on non-embedded systems with C/C++, but in embedded, there is no such luxury. I am new to it but it is painful and I wish to see a day where we have a complete LLVM based ARM compiler toolchain with Rust sitting on top. I think there were some blog posts abo…
Have you looked at TockOS? https://www.tockos.org I took a class in it about 2 years ago now, it was really cool. I’m not an embedded developer though, so not sure of your needs here.
Tock appears to be a Rust based embedded OS, so relevant to this discussion.
Re: Writing an OS in Rust: Introduction to Paging
#15Re: Writing an OS in Rust: Introduction to Paging
#16Earlier quoted context omitted.
> A copy of any data has nearly zero marginal cost I don't think this is true at all. Reducing copies and allocations in my programs is one of the things which has speeded them up the most. > If widely useful data is protected by the borrow checker, far fewer people will use it. Are you also against private struct/class fields? Because they also restrict access to useful data. For me, the need for Rust is as a langua…
The person you're replying seems to be making a parody of copyleft, applying Richard Stallmann's four essential freedoms to program data. I don't think it's a serious attack on Rust's borrow checker.
Re: Writing an OS in Rust: Introduction to Paging
#17As a side note: I wish Rust would come to embedded development ASAP running a real time OS written in Rust. You can use massive Boost libraries and Qt frameworks on non-embedded systems with C/C++, but in embedded, there is no such luxury. I am new to it but it is painful and I wish to see a day where we have a complete LLVM based ARM compiler toolchain with Rust sitting on top. I think there were some blog posts abo…
I’d also like to see Rust make it’s way into embedded. C support for things like data serialization or RPC for interfacing to web stuff is limited, people just don’t port it to C. And C++ doesn’t thrill me in terms of its non-deterministic garbage handling and difficult to debug nature. Rust though, seems modern and still safe, but I looked over the crates for embedded it’s prstty slim pickings!
When I see mfgs pushing out their own Rust libs, or a professional IDE with support I can buy that uses the Rust compiler, I’ll give it a try. Until then, it’s clearly hobbiest-only.
Re: Writing an OS in Rust: Introduction to Paging
#18Earlier quoted context omitted.
I agree. Wouldn't it be amazing to have a "Handmade Hero" series but for OS development in Rust? That would be incredible. A lot of the OS development, especially esoteric subjects are behind walls of IP control barring Linux kernel. Even then, just reading the source code is different than having access to the knowledge base that enables you to write such a code. I am new to all of this but like you, I am fascinated…
Just found "Handmade Hero" last weekend and now this. Programmer's dream
Re: Writing an OS in Rust: Introduction to Paging
#19I've never programmed in Rust because I still have trouble seeing the point. It seems overly restrictive. A copy of any data has nearly zero marginal cost (and you can pay the cost by doing the work yourself), so in a free machine, it would have nearly zero price. If widely useful data is protected by the borrow checker, far fewer people will use it. It is easy to show that the total utility of a piece of data to the…
Re: Writing an OS in Rust: Introduction to Paging
#20Any idea what tool might have been used to create the diagrams?