|
|
Log in / Subscribe / Register

Rustaceans at the border

Rustaceans at the border

Posted Apr 16, 2022 15:39 UTC (Sat) by tialaramex (subscriber, #21167)
In reply to: Rustaceans at the border by jsakkine
Parent article: Rustaceans at the border

Here's the (documentation for the) Rust for Linux alloc crate: https://rust-for-linux.github.io/docs/alloc/index.html

As you will notice, in Rust for Linux the alloc crate's APIs lack functions such as new() which are infallible, and instead only provide the fallible try_new() function, whereas in conventional Rust you can choose.


to post comments

Rustaceans at the border

Posted Apr 16, 2022 17:46 UTC (Sat) by jsakkine (subscriber, #80603) [Link] (1 responses)

Fallible allocation is only a small portion of the problem.

Also, what is required even for the drivers are access directly kmem_cache and gfp_t flags.

Rustaceans at the border

Posted Apr 17, 2022 11:35 UTC (Sun) by tialaramex (subscriber, #21167) [Link]

If it's "required even for the drivers" then presumably both the C and Rust drivers presented for comparison here:

https://lwn.net/Articles/863459/

... illustrate that ?

Of course almost a year has passed since that was written, so Rust and Rust for Linux has made further improvements, but presumably you don't mean that these things somehow became mandatory in the last 12 months.


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