Re: [PATCH net-next v7 0/5] Rust abstractions for network PHY drivers

Boqun Feng
2023-10-27T04:26:56Z

On Thu, Oct 26, 2023 at 08:11:00PM -0700, Boqun Feng wrote:
[...]
> > likely will be merged. Real problems can be fixed up later, if need
> > be.
>
> But this doesn't apply to pure API, right? So if some one post a pure
> Rust API with no user, but some tests, and the CI passes, the API won't
> get merged? Even though no review is fine and if API has problems, we
> can fix it later?
>

I brought this up because (at least) at this stage one of the focus
areas of Rust is: how to wrap C structs and functions into a sound and
reasonable API. So it's ideal if we can see more API proposals.

As you may already see in the reviews of this patchset, a lot of effort
was spent on reviewing the API based on its designed semantics (rather
than its usage in the last patch). This is the extra effort of using
Rust. Is it worth? I don't know, the experiment will answer that in the
end ;-) But at least having an API design with a clear semantics and
some future guards is great.

The review because of this may take longer time than C code, so if we
really want to keep up with netdev speed, maybe we relax the
must-have-in-tree-user rule, so that we can review API design and
soundness in our pace.

Regards,
Boqun