https://github.com/taiki-e/build-context
Make build environment/target information available as constants in normal libraries and binaries.
https://github.com/taiki-e/build-context
no-std rust
Last synced: 3 months ago
JSON representation
Make build environment/target information available as constants in normal libraries and binaries.
- Host: GitHub
- URL: https://github.com/taiki-e/build-context
- Owner: taiki-e
- License: apache-2.0
- Created: 2023-05-01T14:32:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-06T18:01:32.000Z (4 months ago)
- Last Synced: 2026-02-07T02:50:11.552Z (4 months ago)
- Topics: no-std, rust
- Language: Rust
- Homepage:
- Size: 191 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# build-context
[](https://crates.io/crates/build-context)
[](https://docs.rs/build-context)
[](#license)
[](https://www.rust-lang.org)
[](https://github.com/taiki-e/build-context/actions)
Make [build environment/target information](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts) available as constants in normal libraries and binaries.
This is intended primarily for use in tests and its helpers. When used in libraries or binaries, be careful not to depend on constants that depend on the host build environment.
Some constants duplicate those provided in `std::env::consts`.
## License
Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or
[MIT license](LICENSE-MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.