10/03/2025 17:25, Bruce Richardson:
> On Mon, Mar 10, 2025 at 04:13:21PM +0000, Van Haaren, Harry wrote:
> > Looking at the above parts of "Port abstraction in Rust", I'm not sure it 
> > really adds anything.
> > It feels a bit "middle of the road" (aka, adding some "abstraction", but 
> > not going far enough).
> > 
> > What if we took an even smaller step: remove the Rust struct concepts, and 
> > just call the "dpdk::raw::*" unsafe
> > functions directly, as if they were C code. No "struct Port, impl Port", 
> > and no "Iterator<DpdkPort" concepts at all.
> > That would show "correct" usage of the raw generated bindings, and provide 
> > raw API unit-tests.
> > 
> 
> Yes, definite +1 for this. Let's not try and have a half-C, half-Rust set
> of APIs, but instead let's have a clean low-level mapping directly to C
> functions, and then build a proper, safe API on top of that.

+1 about limiting this patch to a low-level unsafe binding,
while allowing a safe high-level API to be created later.



Reply via email to