Lints and build commands

This commit is contained in:
2025-09-20 20:35:18 -06:00
parent a6d429ae41
commit 0c437d816a
8 changed files with 30 additions and 5 deletions
+2
View File
@@ -10,7 +10,9 @@ rust-version = "1.85.0"
[workspace.lints.rust]
arithmetic_overflow = "forbid"
missing_docs = "forbid"
unsafe_code = "forbid"
unused_doc_comments = "forbid"
[workspace.lints.clippy]
arithmetic_side_effects = "forbid"
+4
View File
@@ -6,6 +6,10 @@ A library for build scripts to interface with cargo. It is intended that you add
- build: `cargo hack --feature-powerset build`
- clippy: `cargo hack --feature-powerset clippy -- -D warnings`
- test: `cargo hack --feature-powerset test`
- test old: `cargo +1.85 hack --feature-powerset test`
- miri: `cargo +nightly hack --feature-powerset miri test`
- fmt: `cargo fmt --check`
- docs: `RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features`
- semver: `cargo semver-checks --all-features`
- publish: `cargo publish --dry-run -p architect`
+4
View File
@@ -11,6 +11,10 @@ edition.workspace = true
license-file.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[lints]
workspace = true
+2
View File
@@ -1,2 +1,4 @@
//! Everything relating to getting inputs
/// Raw access for any missing APIs, these may be deleted at any time.
pub mod raw;
+4
View File
@@ -1,2 +1,6 @@
//! Cargo interface for build scripts
#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod input;
pub mod output;
+2
View File
@@ -1,2 +1,4 @@
//! Everything relating to writing outputs
/// Raw access for any missing APIs, these may be deleted at any time.
pub mod raw;
+8 -5
View File
@@ -169,11 +169,14 @@ pub fn rustc_cfg(key: &str, value: Option<&str>) {
///
/// The instruction can be used like this:
///
/// // build.rs
/// println!("cargo::rustc-check-cfg=cfg(foo, values(\"bar\"))");
/// if foo_bar_condition {
/// println!("cargo::rustc-cfg=foo=\"bar\"");
/// }
/// ```no_run
/// # let foo_bar_condition = false;
/// // build.rs
/// println!("cargo::rustc-check-cfg=cfg(foo, values(\"bar\"))");
/// if foo_bar_condition {
/// println!("cargo::rustc-cfg=foo=\"bar\"");
/// }
/// ```
///
/// Note that all possible cfgs should be defined, regardless of which cfgs are
/// currently enabled. This includes all possible values of a given cfg name.
+4
View File
@@ -7,6 +7,10 @@ edition.workspace = true
license-file.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[lints.rust]
arithmetic_overflow = "forbid"
unsafe_code = "forbid"