#cargo-build #build-script #build-time #cargo-metadata #build-dependencies #linux-macos #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

#11 in Build Utils

Download history 1317528/week @ 2024-07-22 1308660/week @ 2024-07-29 1299179/week @ 2024-08-05 1341534/week @ 2024-08-12 1384503/week @ 2024-08-19 1396925/week @ 2024-08-26 1342679/week @ 2024-09-02 1374777/week @ 2024-09-09 1392413/week @ 2024-09-16 1458937/week @ 2024-09-23 1779405/week @ 2024-09-30 2132450/week @ 2024-10-07 2004532/week @ 2024-10-14 1622915/week @ 2024-10-21 1441210/week @ 2024-10-28 1467732/week @ 2024-11-04

6,749,917 downloads per month
Used in 10,734 crates (80 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