moonshine-sys
Low-level C FFI bindings to Moonshine Voice (libmoonshine).
moonshine-sys compiles libmoonshine C++ core via CMake and generates raw extern "C" Rust FFI declarations using bindgen. It statically links ONNX Runtime.
Note: This crate exposes unsafe raw FFI bindings. Most Rust developers should use the safe, high-level wrapper crate
moonshine-rsinstead.
Build Prerequisites
Building moonshine-sys requires a local clone of the moonshine-ai/moonshine repository:
The build script (build.rs) invokes CMake to compile libmoonshine with -DMOONSHINE_BUILD_SHARED=OFF and generates Rust FFI bindings targeting moonshine-c-api.h.
License
Dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.