Messages in this thread | | | Date | Sun, 22 Oct 2023 21:45:41 -0300 | Subject | Re: [RFC PATCH 1/1] scripts: Build per module Rust crates | From | Martin Rodriguez Reboredo <> |
| |
On 10/22/23 13:21, Masahiro Yamada wrote: > On Sat, Oct 7, 2023 at 12:57 AM Martin Rodriguez Reboredo > <yakoyoku@gmail.com> wrote: >> >> Enables compiling Rust crates as dependencies of kernel modules. >> >> When a composite object depends on an `.rlib` file, which by the way is >> a current ar archive, Kbuild will compile it from its base Rust source >> and link it. >> >> This makes possible to have Rust bindings for a subsystem that is >> compiled as a module. >> >> Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> > > > I could not understand how this will work because > there is no explanation how to use *.rlib in the later > build steps. > > If I understand correctly, does this intend to link *.rlib > as a part of modules?
Yes, the purpose of this RFC is to link the *.rlib, its members specifically, as part of modules to avoid the scenario of having Rust bindings linked statically and their C counterparts dynamically.
I'll write a v2 that'll clarify its usage. I've made more progress locally and had run tests with success.
| |