#linux #cargo-build #build-script #build-dependencies #linux-macos #build-time #macos

build vcpkg

A library to find native dependencies in a vcpkg tree at build time in order to be used in Cargo build scripts

26 releases

Uses old Rust 2015

0.2.15 Jun 19, 2021
0.2.13 May 22, 2021
0.2.11 Dec 10, 2020
0.2.10 Jun 10, 2020
0.2.2 Jun 15, 2017

#7 in Build Utils

Download history 893022/week @ 2023-12-01 928844/week @ 2023-12-08 895398/week @ 2023-12-15 503318/week @ 2023-12-22 692907/week @ 2023-12-29 937321/week @ 2024-01-05 920941/week @ 2024-01-12 983618/week @ 2024-01-19 963283/week @ 2024-01-26 1010367/week @ 2024-02-02 1041693/week @ 2024-02-09 996135/week @ 2024-02-16 1078545/week @ 2024-02-23 1086553/week @ 2024-03-01 1072033/week @ 2024-03-08 870761/week @ 2024-03-15

4,287,933 downloads per month
Used in 9,271 crates (75 directly)

MIT/Apache

230KB
2K SLoC

vcpkg-rs Windows macOS Linux

Documentation Changelog

This is a helper for finding libraries in a Vcpkg installation from cargo build scripts. It works similarly to pkg-config. It works on Windows (MSVC ABI), Linux and MacOS.

Example

Find the library named foo in a Vcpkg installation and emit cargo metadata to link it:

// build.rs
fn main() {
    vcpkg::find_package("foo").unwrap();
}

See the crate documentation for more information. See cargo-vcpkg for a convenient way of creating a vcpkg installation.

License

See LICENSE-APACHE, and LICENSE-MIT for details.

No runtime deps