Re: [RFC PATCH v3 0/2] rust: crates in other kernel directories
From: Martin Rodriguez Reboredo
Date: Sun Feb 18 2024 - 11:12:01 EST
On 11/13/23 11:13, Masahiro Yamada wrote:
[...]
I will not provide a line-by-line review.
Just one thing I'd like to point out.
You assume the library (drivers/usb/core/*)
is built before its consumers (samples/rust/*).
If Kbuild ends up with building lib consumers first,
it will be a build error.
Kbuild descends into multiple directories in parallel building.
You cannot predict which directory is built first.
[...]
Thinking with what you've said the same thing might apply to any Rust
written code that depends on crates under the `rust` dir. Adding
Make dependencies to object code made from `.rs` will be required if so,
assuming that Kbuild is intelligent enough to build the crates first.