A Rust bootloader? #5533
Replies: 5 comments 5 replies
-
My thoughts are still the same: I'd want to see a proof of concept before we inject a 3rd programming language which only one of us has any knowledge of. I really don't know if it'll simplify everything or require an intermediate layer of void pointer anarchy. I'd be more for it if were still just you, me, Harmut and Bryan but we have quite a few competent C programmers now. |
Beta Was this translation helpful? Give feedback.
-
@Legorooj Just do it. Try and write a bootloader. Forget onefile / cross-compiling / Apple events / whatever other shenanigans we have in there for now. Either you'll come back and say it was easy, in which case I'll be taking a crash course in Rust and joining your making it a permanent switch. Or you'll stew on it for weeks and come back with something just as unpleasant as our current bootloaders. Either way, we'll have our answer. |
Beta Was this translation helpful? Give feedback.
-
I think this might be an interesting experiment, but I don't have any experience with Rust at all, so I cannot predict how it will turn out. I guess my main concern is maintenance in terms of manpower; among the developers on the team, I suspect we have more people who are at least familiar with C but I'm not sure how far our practical experience with Rust goes. So moving to a language that we are even less familiar with will likely have a negative impact on overall bootloader development (e.g., reviews of bootloader-related PRs) - at least initially. Then again, the transition probably won't happen overnight, either... Currently, the bootloader is doing a lot of low-level interaction with native APIs, which will probably look ugly in Rust and where all its As others have said, the best way to go is probably to make a prototype with limited functionality, just to see how things work out, to demonstrate the benefits, and uncover some (potential) pitfalls. |
Beta Was this translation helpful? Give feedback.
-
To be frank: I'm not conviced this is a good idea. While the rust language seems to be a real step forward, rustc and the rust-environment is a crap: Rust does not have any notion of a library to be shared between builds - not even static ones like ".a". So each any every project has to compile all dependencies from source again. This consumes time and electric power - and is a thread for he climate. This is esp. true for the CI: all dependencies have to be build from scratch on each CI-run. Maybe we could work around this using sophisticated caching - anyhow this is another piece of work to be done. Anyhow, nobody can/will hinder you implementing the bootloader in rust :-) |
Beta Was this translation helpful? Give feedback.
-
Thoughts/opinions/ideas on porting the bootloader to rust?
As an experiment I've started to write a rust copy of the current bootloader.
Beta Was this translation helpful? Give feedback.
All reactions