On Mon, Feb 19, 2024 at 1:11 AM Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx> wrote: > > 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. rust/Makefile specifies dependencies between crates. I do not know how to specify crate dependencies across multiple Makefiles, like you did in drivers/usb/core/Makefile and samples/rust/Makefile. -- Best Regards Masahiro Yamada