Repository navigation
ncnn-rust 0.1.0
First release of the safe ncnn-rust API and the ncnn-rust-sys bindings.
Install
cargo add ncnn-rustncnn-rust supplies the safe API and ncnn-rust-sys supplies the bindings. Both crates ship Rust
code only; building them compiles the C++ adapters against an ncnn 20261020 SDK that the build
environment supplies through NCNN_INSTALL_DIR. The README covers the SDK feature set, the Vulkan
feature and the runtime loader path.
Contents
- Owned-input inference with final-vector or reusable-buffer output, and scoped read-only CPU
output guards that reserve the network without copying. - Tensors, image preprocessing, custom layers, readers, allocators and explicit native option
mapping. - Optional Vulkan backend: device selection, resident tensors, allocator, recording commands,
completed guards, buffer import and persistent pipeline caches. - An in-repo conformance suite that covers shapes, elementwise semantics and a zero-allocation
steady-state gate without external model files.
Documentation
The API reference is published at https://edwardssss.github.io/ncnn.rust/ncnn_rust/. docs.rs
cannot build these crates because its sandbox has no ncnn SDK.
Verification
The v0.1.0 tag passed the CI matrix before publication: ubuntu-latest, ubuntu-24.04-arm,
windows-latest, macos-15, macos-15-intel, the 1.85.1 MSRV job and a Vulkan job on Mesa
lavapipe.