|
|
Log in / Subscribe / Register

Rust in the 6.2 kernel

Rust in the 6.2 kernel

Posted Nov 17, 2022 21:22 UTC (Thu) by djc (subscriber, #56880)
In reply to: Rust in the 6.2 kernel by tialaramex
Parent article: Rust in the 6.2 kernel

Also note that while the article seems to imply that CStr and CString are kernel-specific (and their implementation might well be), normal Rust code also has these types in the std library.


to post comments

Rust in the 6.2 kernel

Posted Nov 17, 2022 22:57 UTC (Thu) by ssokolow (guest, #94568) [Link] (2 responses)

I suspect it has to do with accessing them through core::ffi::CStr and core::ffi::CString being an experimental/nightly-only feature (core_c_str) and them wanting to get to compatibility with stable compilers as quickly as possible.

It wouldn't surprise me if this contributes to the stabilization of the core_c_str feature.

Rust in the 6.2 kernel

Posted Nov 17, 2022 23:00 UTC (Thu) by ssokolow (guest, #94568) [Link]

Correction: I forgot to update my Dash/Zeal docset. core_c_str got stabilized in 1.64.

It's still possible that they're duplicating it to keep compatibility with earlier revisions of the Rust compiler that distros may be packaging though.

Rust in the 6.2 kernel

Posted Nov 17, 2022 23:02 UTC (Thu) by ssokolow (guest, #94568) [Link]

Correction: ...and "core::ffi::CString"? It's an allocating thing. I clearly need to go to sleep right now.


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