| Crates.io | ndi-sdk-sys |
| lib.rs | ndi-sdk-sys |
| version | 0.1.0 |
| created_at | 2025-07-01 17:09:06.718146+00 |
| updated_at | 2025-12-14 12:57:33.315364+00 |
| description | Rust bindings for the NDI SDK |
| homepage | |
| repository | https://github.com/deno-plc/rust-ndi-sdk |
| max_upload_size | |
| id | 1733425 |
| size | 235,253 |
ndi-sdk-sys)Safe and ergonomic Rust bindings for the NDI (ndi.video) SDK, enabling high-performance video, audio, and metadata transmission over IP networks.
Unlike other bindings this never exposes any raw pointers and uses correct Rust
types for everything (timeouts are handled as std::time::Duration, not
time_in_ms: u32)
Despite its name this is not affiliated with ndi, ndi-sdk, ndi-sys crates
This crate is currently tested against SDK version 6.2.0.3
The raw bindings are generated from the header files in the SDK installation directory, this way generated code will always match the version on the machine it is compiled with and linked against.
This crates build.rs is currently lacking support for platforms other than
Windows x64, because I had no time for it so far. If you are working on another
platform, feel free to add support for it. (It shouldn't be that complicated,
windows support is less than 30 lines of nearly-boilerplate code)
ndi-sdk-sys to your cargo dependenciesCheck out the examples at https://github.com/deno-plc/rust-ndi-sdk/tree/main/examples
strict_assertionsThis crate uses a lot of unsafe ffi bindings and therefore a lot of assertions.
You can turn on this feature to ensure debug assertions are in place even for release builds. During development and testing it is highly recommended to turn this on, as it sometimes also outputs more diagnostics.
dangerous_apis (not recommended)There are some (unsafe) APIs that are not really necessary, but might in some rare case be useful. Use only if you REALLY know what you do. For example there are APIs that allow to change the resolution of a video frame while it is allocated, which may lead to out-of-bounds memory access by safe code.
This crate provides safe abstractions of the NDI SDK. The public API is designed to be 100% safe to use (except unsafe APIs of course). If you encounter restrictive lifetimes or &mut borrows, do not try to circumvent them, most likely it just represents the safety requirements of the C SDK.
As expected form a C library, safety requirements are not always documented in-depth by the NDI SDK. One common assumption this crate uses it that it is safe to drop arguments that are passed as pointers (and strings inside them) immediately after the call they were passed to has returned (unless defined otherwise by the documentation).
Contributions are welcome! Here's how you can help:
build.rsCopyright (C) 2025 Hans Schallmoser
Licensed under GPL-v3.
A lot of the doc comments is adapted from the NDI Docs
Note: The NDI SDK is subject to its own EULA.
This project is not affiliated with NDIĀ® or NewTek/Vizrt