Re: [PATCH v3 0/4] rust: extend `module!` macro with integer parameter support

Miguel Ojeda
2024-12-16T15:39:43Z

On Mon, Dec 16, 2024 at 4:08 PM Jens Axboe <axboe@kernel.dk> wrote:
>
> Maybe at some point? The rust version is already there, it's just very
> limited compared to the C version so far. The point of the rust null_blk
> is to build out the API so that a real driver can get implemented as
> well. For now, I think the plan is to just have it be the rust
> playground on the block side.
>
> Given that null_blk is the center piece of a lot of testing, it's not
> necessarily an issue to have duplicate implementations of the same
> driver. In fact it may be pretty useful for people coming from either
> side and wanting to compare implementations and how to do various things
> in either language. It's like an actually useful skeleton driver in that
> sense too.

Agreed. I would suggest to consider marking it as a Rust reference
driver, since it is a prime candidate for it:

https://rust-for-linux.com/rust-reference-drivers

That way, it is clearer that the duplication is meant to build the
abstractions and temporary in the long-term.

Then we can also easily track which ones are meant to be those, and
Greg can get justifiably angry at you/us if the duplication isn't
resolved when the right time comes... :)

Cheers,
Miguel