Skip to content

Rewrite to Rust #58

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

Closed
onkq opened this issue Jan 11, 2025 · 1 comment
Closed

Rewrite to Rust #58

onkq opened this issue Jan 11, 2025 · 1 comment

Comments

@onkq
Copy link

onkq commented Jan 11, 2025

All of the codebase has to be rewritten to a memory safe language. You are missing the future play by starting future projects with non-recommended old programming language and you have a big opportunity to have both repairability and memory safety which in turn increases security. In todays work everything built by Rust has a higher popularity and so I urge you to change as soon as possible.

@JohnAZoidberg
Copy link
Member

I'm a huge fan of Rust and you can see that we do use a lot of Rust: https://github.com/FrameworkComputer?q=&type=all&language=rust&sort= for applications and even some firmware.
In a perfect world I'd rewrite all the firmware in Rust.
But the codebase here is over 10 years old, battle tested on 1000s of ChromeOS devices.
Two years ago Google/ChromeOS moved this firmware from a custom built RTOS to zephyr and they did that by implementing a shim to keep using most of the original code that is EC specific, while just swapping the OS "kernel".

What I'm trying to say is that it's a large, mature codebase where we, as a small company, benefit from all the testing and polishing done over the years and still being done for ChromeOS devices. As the migration to zephyr demonstrates, even Google doesn't think it makes sense to rewrite it completely.
If we rewrote it in any language, we'd probably introduce more bugs than we'd fix by switching languages.

Even system76 who are even more invested in Rust, haven't rewritten their EC firmware yet: https://github.com/system76/ec

@JohnAZoidberg JohnAZoidberg closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2025
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