#sys #search #sndfile #libsndfile

sys sndfile-sys

Rust FFI bindings to libsndfile

5 releases

0.2.1 Apr 4, 2020
0.2.0 Feb 16, 2019
0.1.2 Nov 11, 2018
0.1.1 Oct 22, 2018
0.1.0 Oct 17, 2018

#6 in Encoding

50 downloads per month
Used in sndfile

MIT license

468 lines


Build Status

Rust FFI bindings to libsndfile.


MSVC toolchain

Starting from version v0.1.2 sndfile-sys can use Vcpkg package manager to search for native libsndfile library (thanks to Vcpkg crate):

  • Install Vcpkg
  • install static libsndfile library (x86|x64): vcpkg install libsndfile:x64-windows-static
  • Add Vcpkg path (e.g. d:\vcpkg) to VCPKG_ROOT environment variable
  • Add -Ctarget-feature=+crt-static to RUSTFLAGS environment variable

This search method affects MSVC toolchain only. You can disable it completely with environment varible VCPKGRS_DISABLE set to 1.

Use can link to dynamic libsndfile (not recommended for MSVC toolchain):

  • Install dynamic libsndfile library with command: vcpkg install libsndfile:x64-windows
  • Delete RUSTFLAGS environment variable
  • Set VCPKGRS_DYNAMIC environment variable to 1