> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nixl/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nixl/_mcp/server.

# Rust Bindings

> Build NIXL Rust bindings from source using Meson or Cargo.

## Via Meson

Add the `-Drust=true` flag during Meson setup:

```bash
meson setup <name_of_build_dir> -Drust=true
cd <name_of_build_dir>
ninja
ninja install
```

## Manual Build

Build and install the NIXL C++ library before compiling the Rust crate:

```bash
meson setup build
ninja -C build
ninja -C build install
cargo build --manifest-path src/bindings/rust/Cargo.toml --release
```

## Test

```bash
cargo test
```

## Usage

Add NIXL to your `Cargo.toml`:

```toml
[dependencies]
nixl-sys = { path = "path/to/nixl/src/bindings/rust" }
```

<Note>
For backend-specific build instructions, see [NIXL Backends](/nixl/user-guide/backend-selection).
</Note>