ruapc-rdma-sys

Crates.ioruapc-rdma-sys
lib.rsruapc-rdma-sys
version0.1.0
created_at2026-01-24 13:36:35.409779+00
updated_at2026-01-24 13:36:35.409779+00
descriptionLow-level FFI bindings to libibverbs with type-safe device management for RDMA operations
homepage
repositoryhttps://github.com/SF-Zhou/ruapc-rdma-sys
max_upload_size
id2066692
size97,853
(SF-Zhou)

documentation

README

ruapc-rdma-sys

Low-level Rust FFI bindings to libibverbs for RDMA (Remote Direct Memory Access) operations. This crate provides type-safe device management, safe wrapper types, and JSON serialization support.

This crate is part of the ruapc project.

Requirements

  • Rust 1.85+
  • libibverbs development headers (libibverbs-dev on Debian/Ubuntu)
  • pkg-config

Installing Dependencies

Ubuntu/Debian:

sudo apt-get install libibverbs-dev pkg-config

Fedora/RHEL:

sudo dnf install libibverbs-devel pkg-config

Arch Linux:

sudo pacman -S libibverbs pkgconf

Usage

Add to Cargo.toml:

[dependencies]
ruapc-rdma-sys = "0.1.0"

Device Discovery

use ruapc_rdma_sys::Devices;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let devices = Devices::available()?;
    println!("Found {} RDMA device(s)", devices.len());

    for device in &devices {
        let info = device.info();
        println!("  {}: {} ports", info.name, info.ports.len());
    }

    Ok(())
}

Device Filtering

use ruapc_rdma_sys::{Devices, DeviceConfig, GidType};
use std::collections::HashSet;

let mut config = DeviceConfig::default();
config.device_filter = HashSet::from(["mlx5_0".to_string()]);
config.gid_type_filter = HashSet::from([GidType::RoCEv2]);
config.skip_inactive_port = true;

let devices = Devices::open(&config)?;

CLI Tool

Query RDMA devices from the command line:

cargo install ruapc-rdma-sys
ruapc-rdma-sys

Filter by device or GID type:

ruapc-rdma-sys -d mlx5_0
ruapc-rdma-sys --gid-types RoCEv2 --skip-inactive

License

Licensed under either of:

at your option.

Commit count: 1

cargo fmt