fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.33k stars 120 forks source link

Refactor the CStr API to reduce the need for nightly features #271

Closed alex closed 4 years ago

geofft commented 4 years ago

Hrrrmm. I'm fine with this, but I think we should plan to revert it once we can, because now our API looks pretty different from str and OsStr. That is, I think we should leave const_str_as_bytes (or some other way of accomplishing the same goal) on our list of things we need from Rust upstream.

I don't think const_str_as_bytes is gonna be hard to stabilize (though maybe we should check?), so my personal feeling is that it would be fine to rely on the feature for now - we're on nightly for a while because of alloc, anyway.

Approving, I'll leave it up to you as to whether you want to merge it for now.

alex commented 4 years ago

Just to be clear, the feature in question here is const_raw_ptr_deref, not const_str_as_bytes.