On Mon, Mar 10, 2025 at 09:18:44AM -0700, Stephen Hemminger wrote: > On Thu, 6 Mar 2025 15:37:13 +0200 > Gregory Etelson <getel...@nvidia.com> wrote: > > > The patch converts include files with DPDK API to RUST and binds new > > RUST API files info dpdklib package. > > > > The RUST dpdklib files and DPDK libraries build from C sources > > allow creation of DPDK application in RUST. > > > > RUST DPDK application must specify the `dpdklib` package as > > dependency in Cargo.toml file. > > > > RUST `dpdklib` package is installed into > > MESON_INSTALL_DESTDIR_PREFIX/rust directory. > > > > Software requirements: > > - clang > > - RUST installation > > - bindgen-cli crate > > > > RUST dpdklib installation instructions: > > 1. Configure DPDK with `-Deanble_rust=true` > > 2. Build and install DPDK. The installation procedure will create > > MESON_INSTALL_DESTDIR_PREFIX/rust directory. > > 3. Update PKG_CONFIG_PATH to point to DPDK installation. > > > > Signed-off-by: Gregory Etelson <getel...@nvidia.com> > > --- > > Re-implementing test-pmd, l3fwd, etc in Rust is OK but not huge leap. > The real benefit would the ability to support PMD's built in Rust. > That would be much more invasive >
I'd actually disagree here. I think there is far more value in providing a good, safe set of DPDK APIs and structs for apps written in rust. For drivers, there probably is some value, but reading/writing registers and descriptors will by its nature be unsafe code anyway. I'd also worry about the complexity of trying to mix in rust into our existing build systems etc. I've actually written some test vdevs in rust to interface DPDK, and the amount of crossing the C-rust boundary that was necessary was very painful. There were also huge difficulties around linking and run-time usage, symbol conflicts etc. etc., due to building rust separate from DPDK itself. All solvable, but complex and of limited value to the end-user. So therefore, I'd concentrate on starting at the app layer, and worry about lower level things only thereafter if we need it. /Bruce