Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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

Load and resolve Cargo configuration.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

taiki-e/cargo-config2

crates.iodocs.rslicensemsrvgithub actions

Load and resolveCargo configuration.

This library is intended to accurately emulate the actual behavior of Cargo configuration, for example, this supports the following behaviors:

Supported tables and fields are mainly based oncargo-llvm-cov's use cases, but feel free to submit an issue if you see something missing in your use case.

Usage

Add this to yourCargo.toml:

[dependencies]cargo-config2 ="0.1"

cargo-config2 is usually runnable with Cargo versions older than the Rust version required for build. (e.g., a cargo subcommand usingcargo-config2 could work with older versions such ascargo +1.59 <subcommand>.)

Examples

// Read config files hierarchically from the current directory, merge them,// apply environment variables, and resolve relative paths.let config = cargo_config2::Config::load().unwrap();let target ="x86_64-unknown-linux-gnu";// Resolve target-specific configuration (`target.<triple>` and `target.<cfg>`),// and returns the resolved rustflags for `target`.let rustflags = config.rustflags(target).unwrap();println!("{rustflags:?}");

See also theget example that partial re-implementation ofcargo config get using cargo-config2.

License

Licensed under either ofApache License, Version 2.0 orMIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the work by you, as defined in the Apache-2.0 license, shallbe dual licensed as above, without any additional terms or conditions.

Third party software

This product includes copies and modifications of software developed by third parties:

See the license files included in these directories for more details.

About

Load and resolve Cargo configuration.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

[8]ページ先頭

©2009-2025 Movatter.jp