On 22/03/2025 09:42, Maxim Fomin wrote:
> On Friday, March 21st, 2025 at 8:51 PM, Vladimir 'phcoder' Serbinenko 
> <phco...@gmail.com> wrote:
> 
>> Hello, I was playing with adding Rust embedded in GRUB. I’ve pushed results 
>> to 2 repos:
>> Module goes to https://github.com/phcoder/grub-rust-hello/tree/master
>> Changes in GRUB are found at https://github.com/phcoder/GRUB/tree/rust
>> Notes on implementation:
>> Only i386-pc is implemented right now but it’s not a technical limit, just 
>> others are not implemented yet.
>> I changed GRUB to use ET_DYN (.so) binaries as modules instead of ET_REL 
>> (.o).
>> I disabled mregparm=3. -Z regparm=3 in Rust generally works but the calls to 
>> memcpy() still uses regparm=0 calling convention. Perhaps it’s a bug on Rust 
>> side, perhaps we need an adapter on our side.
>> It’s compiled with panic=abort. Unwinding panics require rust_eh_personality 
>> that isn’t implemented yet.
>> src/lib.rs is an example of hello world and grub_lib.rs is a grub-rust 
>> adapter. Ideally they should be in separate crates
>> Every module now pulls in rust runtime. Idk how to switch to a shared runtime
>> Consider it more an experiment and request for comments than a working 
>> product. I would be interested to hear any comments. Especially it’s 
>> interesting to hear from Rust folks as to how to make it more idiomatic Rust.
> 
> I found it indicative that the post about introducing Rust into the project 
> lacks any technical discussion about the merits of doing so. This agrees with 
> the Rust criticism point that bringing Rust into project is often caused by 
> programmers wanting to show off ("me/project is cool because it has Rust") 
> rather than technical merits.
> 
> Best regards,
> Maxim Fomin

Hello,

by lack of knowledge I have no idea about merits of rust compared to any other
programming language.

Generally speaking my wish as an end user and packager is that providing a new
stable release takes priority over any enhancement or addition of new features.

Maybe not an issue for Debian, but how many distributions have the resources
needed to check and carry hundreds of patches?

Cheers,
Didier

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to