Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

looks possible to use std::fs::File::write_all #455

Open
bingmatv opened this issue Aug 22, 2024 · 3 comments
Open

looks possible to use std::fs::File::write_all #455

bingmatv opened this issue Aug 22, 2024 · 3 comments

Comments

@bingmatv
Copy link

Rust has write_all() in std::fs::File, it may be able to write certain numbers (machine code) into a file. Can it replace some Assembly and remove some Nightly feature usages in this repo?

@Freax13
Copy link
Member

Freax13 commented Aug 22, 2024

Can you elaborate on what specific files you want to write to?

Can it replace some Assembly

I don't think we'll want to replace assembly with straight-up machine code. Machine code is unreadable and difficult to maintain whereas assembly isn't (though we try to use as much Rust as possible).

and remove some Nightly feature usages in this repo?

AFAICT we only use one nightly rustc feature directly and probably some of them indirectly through dependencies. We might be able to cut down on some of these, but we won't be able to remove them completely until binary dependencies are stabilized in cargo (I haven't seen much progress on that lately). That said we haven't had many problems with nightly breakages in the past few months, so I don't see a strong need to cut down on nightly features.

@bingmatv
Copy link
Author

Can you elaborate on what specific files you want to write to?

To make bootable images for BIOS and UEFI.

@Freax13
Copy link
Member

Freax13 commented Aug 22, 2024

We already make bootable BIOS and UEFI images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants