lkml.org 
[lkml]   [2023]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 1/1] scripts: Build per module Rust crates
From
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.

\
 
 \ /
  Last update: 2023-10-23 02:47    [W:1.546 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site