Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

joshtriplett/metadeps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

10 Commits

Repository files navigation

metadeps lets you write pkg-config dependencies in Cargo.toml metadata, rather than programmatically in build.rs. This makes those dependencies declarative, so other tools can read them as well.

Usage

In your Cargo.toml, add the following to your [build-dependencies]:

metadeps = "1.1"

Then, to declare a dependency on testlib >= 1.2, and a conditional dependency on testdata >= 4.5, add the following section:

[package.metadata.pkg-config]
testlib = "1.2"
testdata = { version = "4.5", feature = "use-testdata" }

In your build.rs, add:

extern crate metadeps;
fn main() {
 metadeps::probe().unwrap();
}

About

Run pkg-config from declarative dependencies in Cargo.toml

Resources

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /