Skip to content

Commit ba2a22a

Browse files
authored
Merge pull request #851 from Shnatsel/unstable-api-is-unstable
Add a warning to advertise that the library API is unstable
2 parents 6a865f5 + 50db43c commit ba2a22a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

cargo-cyclonedx/src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
#![doc = concat!(
2+
"## WARNING\n",
3+
"\n",
4+
"The library API of `cargo-cyclonedx` is **unstable** and not subject to semantic versioning guarantees!\n",
5+
"\n",
6+
"If the command-line interface is not sufficient, you can depend on this API and avoid breakage\n",
7+
"so long as you pin a specific version:\n",
8+
"\n",
9+
"```toml\n",
10+
"cargo-cyclonedx = \"= ", env!("CARGO_PKG_VERSION"), "\" # avoids build failures\n",
11+
"```\n",
12+
"\n",
13+
"Do **NOT** do this:\n",
14+
"```toml\n",
15+
"cargo-cyclonedx = \"", env!("CARGO_PKG_VERSION"), "\" # WRONG, don't use, will break!\n",
16+
"```",
17+
)]
18+
119
/*
220
* This file is part of CycloneDX Rust Cargo.
321
*

0 commit comments

Comments
 (0)