|
|
Subscribe / Log in / New account

If you can't join 'em...

If you can't join 'em...

Posted Sep 10, 2024 18:01 UTC (Tue) by johill (subscriber, #25196)
In reply to: If you can't join 'em... by mb
Parent article: Rust-for-Linux developer Wedson Almeida Filho drops out

> Arm32 has tier 2 support. It works pretty well (I use it).

The kernel doesn't support it, according to the rust documentation. Maybe that's outdated, or maybe you're saying that just about the compiler?

> Ok. Is that really a big thing? Should that block us? These are the questions I'd like to see.
> And yes, the answer *can* be yes, if there are facts that show this.

I have no idea. WiFi is pretty universal these days.

But even the rust people don't yet seem to advocate making rust a hard dependency for much if anything, so I think the point is moot. They also don't have a story for calling rust from C rather than the other way around, which would actually be the use case I'd first be interested in here to make some critical parsing code better.


to post comments

If you can't join 'em...

Posted Sep 10, 2024 18:35 UTC (Tue) by mb (subscriber, #50428) [Link]

>or maybe you're saying that just about the compiler?

Yes, I was only talking about the compiler. Adding kernel support looks like a minor issue to me.
Of course it has to be done and as long as it hasn't been done it's a blocker of course.

>They also don't have a story for calling rust from C

The Rust code just has to provide an unsafe extern-C function to be called. That's it. There's nothing special about that. It's a Rust function that has normal C linkage.

>But even the rust people don't yet seem to advocate making rust a hard dependency for much if anything,

People need to understand why that is on a case by case basis.
I completely agree with you that it's not prime time for Rust-Wifi, yet. But that doesn't say anything about how much work is left to that goal. And *that* actually is the interesting question that can be used to make progress.

Calling Rust from C

Posted Sep 10, 2024 19:06 UTC (Tue) by farnz (subscriber, #17727) [Link]

Calling Rust from C is fairly well established outside the kernel, with cbindgen helping to reduce the amount of C-side boilerplate you have to keep in-sync with the Rust #[no_mangle] code and #[repr(C)] data structures.

I would hope that the Rust-for-Linux people would be willing and able to help you do a good job if you were trying to write in-kernel Rust that's called from C - adding in things like cbindgen to the build system to make your life as simple as possible.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds