Rust-for-Linux / linux

Adding support for the Rust language to the Linux kernel.
https://rust-for-linux.com
Other
3.83k stars 399 forks source link

rust: types: Add `try_from_foreign()` method #1059

Closed obeis closed 2 months ago

obeis commented 5 months ago

Close #1057

ojeda commented 5 months ago

Thanks!

The commit should be signed (in the Signed-off-by sense, please see https://docs.kernel.org/process/submitting-patches.html#developer-s-certificate-of-origin-1-1) and should have a Link: tag to the issue.

The commit message could perhaps also show how a user would look like (like one of the ones linked in the issue).

Apart from that, it seems OK to submit it to the mailing list -- please see https://rust-for-linux.com/contributing.

charmitro commented 5 months ago

Looks good. Is there code in the tree that can use this right away or we'd have to wait for patches to get merged?

ojeda commented 4 months ago

try_from_foreign (option 1 in the linked issue) is now in rust-next.

obeis commented 2 months ago

Done: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5bc818419a551ab1fcdbff3c5d8b6043527d90dd