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

Migrate to Rust #59

Open
stalkerg opened this issue Nov 30, 2023 · 2 comments
Open

Migrate to Rust #59

stalkerg opened this issue Nov 30, 2023 · 2 comments

Comments

@stalkerg
Copy link
Contributor

Why?

  1. It is just for a discussion.
  2. Educate how kernel Rust is working.
  3. liquidtux is small enough to create such a migration without too much effort.
  4. We already have some race condition challenges maybe Rust can simplify them.
  5. Just-for-fun, hype

It's not a proposal I just want to hear your opinion. For me the main obstacle it's the lack of GCC support (yet) and in that case, we must build kernel by llvm.

Regards,

@aleksamagicka
Copy link
Member

I couldn't care less what compiler is being used, as long as it's not a PITA to configure and carry on.

I'll admit that I'm not completely up to speed with where the kernel stands with Rust right now, but I certainly don't want to be the one trying to upstream any glue code for hwmon :) Perhaps this doesn't make sense at all, or it's not needed, but you get the idea.

And I don't think it's a good idea to drop the current C drivers and just switch to Rust. If the option to use Rust becomes available, then I'd prefer that only new drivers be written in it (if the author/s want). Maintaining both versions in principle is a pain and I don't think upstream would be very happy to get a patch replacing C with Rust just for fun.

IOW, I'm not against Rust. I'm all in for new tech etc, but my opinion is that it's too early. And personally I'd like to see a complete example of a hwmon Rust driver that can compile, be inserted etc and what modifications to the kernel were needed to get there.

@stalkerg
Copy link
Contributor Author

And I don't think it's a good idea to drop the current C drivers and just switch to Rust. If the option to use Rust becomes available, then I'd prefer that only new drivers be written in it (if the author/s want). Maintaining both versions in principle is a pain and I don't think upstream would be very happy to get a patch replacing C with Rust just for fun.

Yeah, I agree.

And personally I'd like to see a complete example of a hwmon Rust driver that can compile, be inserted etc and what modifications to the kernel were needed to get there.

seems like a better way to understand it would be to try to make a dummy driver with fake indicators, but I don't think it will be too much of a problem if even DRM bonded already and the Apple GPU driver works very well.

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