docs.rs failed to build rusto-mnn-sys-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
MNN-sys
Low-level FFI bindings for the MNN (Mobile Neural Network) library.
Overview
This crate provides unsafe C bindings to MNN through a custom C wrapper layer. It is not intended to be used directly - use the mnn crate instead for safe, idiomatic Rust bindings.
Building
Requirements
- CMake 3.10 or higher
- C++11 compatible compiler (GCC 4.8+, Clang 3.3+, MSVC 2015+)
- Platform-specific dependencies:
- macOS/iOS: Xcode with Metal SDK
- Linux: Standard build tools
- Android: NDK
Build Process
The build script (build.rs) performs the following:
- Compiles MNN from the vendored source using CMake
- Compiles the C wrapper (
mnn_wrapper.cpp) - Generates Rust bindings using bindgen
- Links everything together
The build is configured for static linking by default to ensure the binaries are self-contained.
Platform Configuration
The build script automatically enables platform-specific backends:
- macOS/iOS: Metal, CoreML
- Linux: OpenCL
- Android: OpenCL
License
MNN is licensed under Apache 2.0. See the vendor/mnn directory for details.