[PATCH v4] rust: support raw DPDK API
Etelson, Gregory
getelson at nvidia.com
Fri Mar 28 19:30:25 CET 2025
Hello Bruce,
>
> When using bindgen, are we better to take the approach (as in this patch)
> of running it on everything in the headers and just excluding some things,
> or taking the opposite conservative approach of just listing the functions
> and defines we actually do want exposed (with wildcarding as necessary)?
> When playing with rust apps on top of DPDK myself, I've tended toward the
> latter scheme, but maybe for this effort we may want the former.
The current library produced a lot of warnings during compilation.
Many of these warnings were result of symbol duplication.
It looks like removing unnecessery duplicated symbols is the right way.
However, I could not activate regex symbol match in bindgen-0.71.1 cli utility.
At this stage I translate files from a shell script. This way I can translate
a single file on demand.
>
> I'm not convinced by having this done as a post-install script. Instead I'd
> tend towards having a rust crate hosted somewhere that does the bindgen as
> part of the rust build.
I'm already implementing that approach.
>
> <snip>
>
>> +
>> + match pkgconfig.args(["--libs", "libdpdk"]).output() {
>
> This work of using pkgconfig should not be necessary in the application
> build.rs file. If we switch to actually producing a proper crate, the
> pkgconfig handling and linking should be covered there (I would hope,
> anyway).
>
I need pkgconfig for dynamic linker.
Regards,
Gregory
More information about the dev
mailing list