Rust bindings for Spout2 on Windows.
- This crate provides direct bindings to SpoutLibrary and builds Spout2 from source during build.
- Windows-only behavior is expected.
- Source resolution order:
SPOUT2_DIRenvironment variable (must point to existing Spout2 sources)- Local
./Spout2directory - Optional auto-fetch when
RUST_SPOUT2_ALLOW_FETCH=1(clones tag2.007h)
# Recommended: use pre-fetched sources
$env:SPOUT2_DIR = "C:/path/to/Spout2"
# Optional: allow build.rs to fetch sources when missing
$env:RUST_SPOUT2_ALLOW_FETCH = "1"use rust_spout2::Spout;
fn main() {
let mut spout = Spout::new().expect("failed to get Spout handle");
let version = spout.as_pin_mut().GetSpoutVersion();
println!("Spout version: {version}");
}