diff --git a/cargo-sbom/src/graph.rs b/cargo-sbom/src/graph.rs index d7852d1..53e0d33 100644 --- a/cargo-sbom/src/graph.rs +++ b/cargo-sbom/src/graph.rs @@ -50,12 +50,6 @@ pub fn build<'a>(metadata: &'a Metadata) -> Result, Error> { let to = graph.nodes[&dep.pkg]; for kind in kinds { - // skip dev dependencies - if kind == DependencyKind::Development || kind == DependencyKind::Build - { - continue; - } - graph.graph.add_edge(from, to, kind); } } diff --git a/cargo-sbom/src/util/spdx/mod.rs b/cargo-sbom/src/util/spdx/mod.rs index 3e33e45..ad62f6b 100644 --- a/cargo-sbom/src/util/spdx/mod.rs +++ b/cargo-sbom/src/util/spdx/mod.rs @@ -195,14 +195,40 @@ pub fn convert( edges.for_each(|e| { let source = &graph.graph[e.source()]; let target = &graph.graph[e.target()]; - relationships.insert(HashableSpdxItemRelationships( - serde_spdx::spdx::v_2_3::SpdxItemRelationshipsBuilder::default() - .spdx_element_id(generate_project_id(source)) - .related_spdx_element(generate_project_id(target)) - .relationship_type("DEPENDS_ON") - .build() - .unwrap(), - )); + let source_project_id = generate_project_id(source); + let target_project_id = generate_project_id(target); + + let relationship = match e.weight() { + cargo_metadata::DependencyKind::Normal => Some( + serde_spdx::spdx::v_2_3::SpdxItemRelationshipsBuilder::default() + .spdx_element_id(source_project_id) + .related_spdx_element(target_project_id) + .relationship_type("DEPENDS_ON") + .build() + .unwrap(), + ), + cargo_metadata::DependencyKind::Build => Some( + serde_spdx::spdx::v_2_3::SpdxItemRelationshipsBuilder::default() + .spdx_element_id(target_project_id) + .related_spdx_element(source_project_id) + .relationship_type("BUILD_TOOL_OF") + .build() + .unwrap(), + ), + cargo_metadata::DependencyKind::Development => Some( + serde_spdx::spdx::v_2_3::SpdxItemRelationshipsBuilder::default() + .spdx_element_id(target_project_id) + .related_spdx_element(source_project_id) + .relationship_type("DEV_DEPENDENCY_OF") + .build() + .unwrap(), + ), + cargo_metadata::DependencyKind::Unknown => None, + }; + + if let Some(relationship) = relationship { + relationships.insert(HashableSpdxItemRelationships(relationship)); + } }); } diff --git a/examples/cargo-binary/Cargo.lock b/examples/cargo-binary/Cargo.lock index 02f5c8b..a2054fa 100644 --- a/examples/cargo-binary/Cargo.lock +++ b/examples/cargo-binary/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "anstream" @@ -51,6 +51,21 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + [[package]] name = "bitflags" version = "2.4.1" @@ -61,6 +76,7 @@ checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" name = "cargo-binary" version = "0.1.0" dependencies = [ + "approx", "clap", ] @@ -173,6 +189,15 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + [[package]] name = "once_cell" version = "1.18.0" diff --git a/examples/cargo-binary/Cargo.toml b/examples/cargo-binary/Cargo.toml index 5bf5c71..06c1bde 100644 --- a/examples/cargo-binary/Cargo.toml +++ b/examples/cargo-binary/Cargo.toml @@ -6,3 +6,6 @@ edition = "2021" [dependencies] clap = { version = "4.3.11", features = ["derive"] } + +[dev-dependencies] +approx = "0.5.1" diff --git a/examples/cargo-binary/sbom.spdx.json b/examples/cargo-binary/sbom.spdx.json index 2915e3b..46d1951 100644 --- a/examples/cargo-binary/sbom.spdx.json +++ b/examples/cargo-binary/sbom.spdx.json @@ -1,330 +1,364 @@ { "SPDXID": "SPDXRef-DOCUMENT", "creationInfo": { - "created": "2023-07-10T12:38:05.978Z", + "created": "2026-02-03T14:29:24Z", "creators": [ "Tool: cargo-sbom-v0.10.0" ] }, "dataLicense": "CC0-1.0", - "documentNamespace": "https://spdx.org/spdxdocs/cargo-binary-97f506ab-63f5-473c-9dcf-d1b41a6523b5", + "documentNamespace": "https://spdx.org/spdxdocs/cargo-binary-cc29e08c-0b9c-4533-9980-792ea1b8b7e2", "files": [ { "SPDXID": "SPDXRef-File-cargo-binary", - "checksums": [], - "fileName": "cargo-binary", + "checksums": [ + { + "algorithm": "SHA1", + "checksumValue": "fe68bd3c5c8e1d0504b0c1cbc4eb4a3cf219e3e7" + } + ], + "fileName": "./Cargo.lock", "fileTypes": [ - "BINARY" + "SOURCE", + "TEXT" ] } ], "name": "cargo-binary", "packages": [ { - "SPDXID": "SPDXRef-Package-strsim-0.10.0", - "description": "Implementations of string similarity metrics. Includes Hamming, Levenshtein,\nOSA, Damerau-Levenshtein, Jaro, Jaro-Winkler, and Sørensen-Dice.\n", + "SPDXID": "SPDXRef-Package-colorchoice-1.0.0", + "description": "Global override of color control", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/strsim@0.10.0", + "referenceLocator": "pkg:cargo/colorchoice@1.0.0", "referenceType": "purl" } ], - "homepage": "https://github.com/dguo/strsim-rs", - "licenseConcluded": "MIT", - "licenseDeclared": "MIT", - "name": "strsim" + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "colorchoice", + "versionInfo": "1.0.0" }, { - "SPDXID": "SPDXRef-Package-windows_x86_64_gnullvm-0.48.0", + "SPDXID": "SPDXRef-Package-windows--x86--64--msvc-0.48.0", "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_x86_64_gnullvm@0.48.0", + "referenceLocator": "pkg:cargo/windows_x86_64_msvc@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_x86_64_gnullvm" + "name": "windows_x86_64_msvc", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-anstream-0.3.2", - "description": "A simple cross platform library for writing colored text to a terminal.", + "SPDXID": "SPDXRef-Package-approx-0.5.1", + "description": "Approximate floating point equality comparisons and assertions.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/anstream@0.3.2", + "referenceLocator": "pkg:cargo/approx@0.5.1", "referenceType": "purl" } ], - "homepage": "https://github.com/rust-cli/anstyle", - "licenseConcluded": "MIT OR Apache-2.0", - "licenseDeclared": "MIT OR Apache-2.0", - "name": "anstream" + "homepage": "https://github.com/brendanzab/approx", + "licenseConcluded": "Apache-2.0", + "licenseDeclared": "Apache-2.0", + "name": "approx", + "versionInfo": "0.5.1" }, { - "SPDXID": "SPDXRef-Package-once_cell-1.18.0", - "description": "Single assignment cells and lazy values.", + "SPDXID": "SPDXRef-Package-libc-0.2.149", + "description": "Raw FFI bindings to platform libraries like libc.\n", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/once_cell@1.18.0", + "referenceLocator": "pkg:cargo/libc@0.2.149", "referenceType": "purl" } ], + "homepage": "https://github.com/rust-lang/libc", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "once_cell" + "name": "libc", + "versionInfo": "0.2.149" }, { - "SPDXID": "SPDXRef-Package-clap_lex-0.5.0", - "description": "Minimal, flexible command line parser", + "SPDXID": "SPDXRef-Package-anstream-0.3.2", + "description": "A simple cross platform library for writing colored text to a terminal.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/clap_lex@0.5.0", + "referenceLocator": "pkg:cargo/anstream@0.3.2", "referenceType": "purl" } ], + "homepage": "https://github.com/rust-cli/anstyle", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "clap_lex" + "name": "anstream", + "versionInfo": "0.3.2" }, { - "SPDXID": "SPDXRef-Package-quote-1.0.29", - "description": "Quasi-quoting macro quote!(...)", + "SPDXID": "SPDXRef-Package-cargo-binary-0.1.0", + "downloadLocation": "NONE", + "licenseConcluded": "NOASSERTION", + "name": "cargo-binary", + "versionInfo": "0.1.0" + }, + { + "SPDXID": "SPDXRef-Package-num-traits-0.2.19", + "description": "Numeric traits for generic mathematics", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/quote@1.0.29", + "referenceLocator": "pkg:cargo/num-traits@0.2.19", "referenceType": "purl" } ], + "homepage": "https://github.com/rust-num/num-traits", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "quote" + "name": "num-traits", + "versionInfo": "0.2.19" }, { - "SPDXID": "SPDXRef-Package-anstyle-parse-0.2.1", - "description": "Parse ANSI Style Escapes", + "SPDXID": "SPDXRef-Package-windows--i686--gnu-0.48.0", + "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/anstyle-parse@0.2.1", + "referenceLocator": "pkg:cargo/windows_i686_gnu@0.48.0", "referenceType": "purl" } ], - "homepage": "https://github.com/rust-cli/anstyle", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "anstyle-parse" + "name": "windows_i686_gnu", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-unicode-ident-1.0.10", - "description": "Determine whether characters have the XID_Start or XID_Continue properties according to Unicode Standard Annex #31", + "SPDXID": "SPDXRef-Package-errno-0.3.1", + "description": "Cross-platform interface to the `errno` variable.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/unicode-ident@1.0.10", + "referenceLocator": "pkg:cargo/errno@0.3.1", "referenceType": "purl" } ], - "licenseConcluded": "(MIT OR Apache-2.0) AND Unicode-DFS-2016", - "licenseDeclared": "(MIT OR Apache-2.0) AND Unicode-DFS-2016", - "name": "unicode-ident" + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "errno", + "versionInfo": "0.3.1" }, { - "SPDXID": "SPDXRef-Package-windows_i686_gnu-0.48.0", - "description": "Import lib for Windows", + "SPDXID": "SPDXRef-Package-clap--lex-0.5.0", + "description": "Minimal, flexible command line parser", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_i686_gnu@0.48.0", + "referenceLocator": "pkg:cargo/clap_lex@0.5.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_i686_gnu" + "name": "clap_lex", + "versionInfo": "0.5.0" }, { - "SPDXID": "SPDXRef-Package-windows-targets-0.48.1", - "description": "Import libs for Windows", + "SPDXID": "SPDXRef-Package-windows--aarch64--gnullvm-0.48.0", + "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows-targets@0.48.1", + "referenceLocator": "pkg:cargo/windows_aarch64_gnullvm@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows-targets" + "name": "windows_aarch64_gnullvm", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-colorchoice-1.0.0", - "description": "Global override of color control", + "SPDXID": "SPDXRef-Package-anstyle-parse-0.2.1", + "description": "Parse ANSI Style Escapes", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/colorchoice@1.0.0", + "referenceLocator": "pkg:cargo/anstyle-parse@0.2.1", "referenceType": "purl" } ], + "homepage": "https://github.com/rust-cli/anstyle", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "colorchoice" + "name": "anstyle-parse", + "versionInfo": "0.2.1" }, { - "SPDXID": "SPDXRef-Package-windows-sys-0.48.0", - "description": "Rust for Windows", + "SPDXID": "SPDXRef-Package-windows--x86--64--gnu-0.48.0", + "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows-sys@0.48.0", + "referenceLocator": "pkg:cargo/windows_x86_64_gnu@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows-sys" + "name": "windows_x86_64_gnu", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-anstyle-1.0.1", - "description": "ANSI text styling", + "SPDXID": "SPDXRef-Package-clap-4.3.11", + "description": "A simple to use, efficient, and full-featured Command Line Argument Parser", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/anstyle@1.0.1", + "referenceLocator": "pkg:cargo/clap@4.3.11", "referenceType": "purl" } ], - "homepage": "https://github.com/rust-cli/anstyle", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "anstyle" + "name": "clap", + "versionInfo": "4.3.11" }, { - "SPDXID": "SPDXRef-Package-is-terminal-0.4.9", - "description": "Test whether a given stream is a terminal", + "SPDXID": "SPDXRef-Package-utf8parse-0.2.1", + "description": "Table-driven UTF-8 parser", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/is-terminal@0.4.9", + "referenceLocator": "pkg:cargo/utf8parse@0.2.1", "referenceType": "purl" } ], - "licenseConcluded": "MIT", - "licenseDeclared": "MIT", - "name": "is-terminal" + "licenseConcluded": "Apache-2.0 OR MIT", + "licenseDeclared": "Apache-2.0 OR MIT", + "name": "utf8parse", + "versionInfo": "0.2.1" }, { - "SPDXID": "SPDXRef-Package-libc-0.2.147", - "description": "Raw FFI bindings to platform libraries like libc.\n", + "SPDXID": "SPDXRef-Package-windows--x86--64--gnullvm-0.48.0", + "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/libc@0.2.147", + "referenceLocator": "pkg:cargo/windows_x86_64_gnullvm@0.48.0", "referenceType": "purl" } ], - "homepage": "https://github.com/rust-lang/libc", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "libc" + "name": "windows_x86_64_gnullvm", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-clap_derive-4.3.2", - "description": "Parse command line argument by defining a struct, derive crate.", + "SPDXID": "SPDXRef-Package-clap--builder-4.3.11", + "description": "A simple to use, efficient, and full-featured Command Line Argument Parser", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/clap_derive@4.3.2", + "referenceLocator": "pkg:cargo/clap_builder@4.3.11", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "clap_derive" + "name": "clap_builder", + "versionInfo": "4.3.11" }, { - "SPDXID": "SPDXRef-Package-heck-0.4.1", - "description": "heck is a case conversion library.", + "SPDXID": "SPDXRef-Package-unicode-ident-1.0.10", + "description": "Determine whether characters have the XID_Start or XID_Continue properties according to Unicode Standard Annex #31", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/heck@0.4.1", + "referenceLocator": "pkg:cargo/unicode-ident@1.0.10", "referenceType": "purl" } ], - "homepage": "https://github.com/withoutboats/heck", - "licenseConcluded": "MIT OR Apache-2.0", - "licenseDeclared": "MIT OR Apache-2.0", - "name": "heck" + "licenseConcluded": "(MIT OR Apache-2.0) AND Unicode-DFS-2016", + "licenseDeclared": "(MIT OR Apache-2.0) AND Unicode-DFS-2016", + "name": "unicode-ident", + "versionInfo": "1.0.10" }, { - "SPDXID": "SPDXRef-Package-hermit-abi-0.3.2", - "description": "Hermit system calls definitions.", + "SPDXID": "SPDXRef-Package-windows-targets-0.48.1", + "description": "Import libs for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/hermit-abi@0.3.2", + "referenceLocator": "pkg:cargo/windows-targets@0.48.1", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "hermit-abi" + "name": "windows-targets", + "versionInfo": "0.48.1" }, { - "SPDXID": "SPDXRef-Package-rustix-0.38.3", - "description": "Safe Rust bindings to POSIX/Unix/Linux/Winsock2-like syscalls", + "SPDXID": "SPDXRef-Package-anstyle-1.0.1", + "description": "ANSI text styling", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/rustix@0.38.3", + "referenceLocator": "pkg:cargo/anstyle@1.0.1", "referenceType": "purl" } ], - "licenseConcluded": "Apache-2.0 OR Apache-2.0 OR MIT", - "licenseDeclared": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", - "name": "rustix" + "homepage": "https://github.com/rust-cli/anstyle", + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "anstyle", + "versionInfo": "1.0.1" }, { - "SPDXID": "SPDXRef-Package-errno-0.3.1", - "description": "Cross-platform interface to the `errno` variable.", + "SPDXID": "SPDXRef-Package-strsim-0.10.0", + "description": "Implementations of string similarity metrics. Includes Hamming, Levenshtein,\nOSA, Damerau-Levenshtein, Jaro, Jaro-Winkler, and Sørensen-Dice.\n", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/errno@0.3.1", + "referenceLocator": "pkg:cargo/strsim@0.10.0", "referenceType": "purl" } ], - "licenseConcluded": "MIT OR Apache-2.0", - "licenseDeclared": "MIT OR Apache-2.0", - "name": "errno" + "homepage": "https://github.com/dguo/strsim-rs", + "licenseConcluded": "MIT", + "licenseDeclared": "MIT", + "name": "strsim", + "versionInfo": "0.10.0" }, { "SPDXID": "SPDXRef-Package-anstyle-query-1.0.0", @@ -339,103 +373,137 @@ ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "anstyle-query" + "name": "anstyle-query", + "versionInfo": "1.0.0" }, { - "SPDXID": "SPDXRef-Package-linux-raw-sys-0.4.3", - "description": "Generated bindings for Linux's userspace API", + "SPDXID": "SPDXRef-Package-autocfg-1.5.0", + "description": "Automatic cfg for Rust compiler features", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/linux-raw-sys@0.4.3", + "referenceLocator": "pkg:cargo/autocfg@1.5.0", "referenceType": "purl" } ], - "licenseConcluded": "Apache-2.0 OR Apache-2.0 OR MIT", - "licenseDeclared": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", - "name": "linux-raw-sys" + "licenseConcluded": "Apache-2.0 OR MIT", + "licenseDeclared": "Apache-2.0 OR MIT", + "name": "autocfg", + "versionInfo": "1.5.0" }, { - "SPDXID": "SPDXRef-Package-windows_aarch64_msvc-0.48.0", + "SPDXID": "SPDXRef-Package-windows--i686--msvc-0.48.0", "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_aarch64_msvc@0.48.0", + "referenceLocator": "pkg:cargo/windows_i686_msvc@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_aarch64_msvc" + "name": "windows_i686_msvc", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-clap-4.3.11", - "description": "A simple to use, efficient, and full-featured Command Line Argument Parser", + "SPDXID": "SPDXRef-Package-is-terminal-0.4.9", + "description": "Test whether a given stream is a terminal", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/clap@4.3.11", + "referenceLocator": "pkg:cargo/is-terminal@0.4.9", "referenceType": "purl" } ], - "licenseConcluded": "MIT OR Apache-2.0", - "licenseDeclared": "MIT OR Apache-2.0", - "name": "clap" + "licenseConcluded": "MIT", + "licenseDeclared": "MIT", + "name": "is-terminal", + "versionInfo": "0.4.9" }, { - "SPDXID": "SPDXRef-Package-cargo-binary-0.1.0", - "downloadLocation": "NONE", - "licenseConcluded": "NOASSERTION", - "name": "cargo-binary" + "SPDXID": "SPDXRef-Package-rustix-0.38.19", + "description": "Safe Rust bindings to POSIX/Unix/Linux/Winsock2-like syscalls", + "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceLocator": "pkg:cargo/rustix@0.38.19", + "referenceType": "purl" + } + ], + "licenseConcluded": "Apache-2.0 OR Apache-2.0 OR MIT", + "licenseDeclared": "Apache-2.0 OR Apache-2.0 OR MIT", + "name": "rustix", + "versionInfo": "0.38.19" }, { - "SPDXID": "SPDXRef-Package-clap_builder-4.3.11", - "description": "A simple to use, efficient, and full-featured Command Line Argument Parser", + "SPDXID": "SPDXRef-Package-hermit-abi-0.3.2", + "description": "Hermit system calls definitions.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/clap_builder@4.3.11", + "referenceLocator": "pkg:cargo/hermit-abi@0.3.2", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "clap_builder" + "name": "hermit-abi", + "versionInfo": "0.3.2" }, { - "SPDXID": "SPDXRef-Package-windows_x86_64_msvc-0.48.0", - "description": "Import lib for Windows", + "SPDXID": "SPDXRef-Package-quote-1.0.29", + "description": "Quasi-quoting macro quote!(...)", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_x86_64_msvc@0.48.0", + "referenceLocator": "pkg:cargo/quote@1.0.29", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_x86_64_msvc" + "name": "quote", + "versionInfo": "1.0.29" }, { - "SPDXID": "SPDXRef-Package-errno-dragonfly-0.1.2", - "description": "Exposes errno functionality to stable Rust on DragonFlyBSD", + "SPDXID": "SPDXRef-Package-cc-1.0.79", + "description": "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/errno-dragonfly@0.1.2", + "referenceLocator": "pkg:cargo/cc@1.0.79", "referenceType": "purl" } ], - "licenseConcluded": "MIT", - "licenseDeclared": "MIT", - "name": "errno-dragonfly" + "homepage": "https://github.com/rust-lang/cc-rs", + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "cc", + "versionInfo": "1.0.79" + }, + { + "SPDXID": "SPDXRef-Package-once--cell-1.18.0", + "description": "Single assignment cells and lazy values.", + "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceLocator": "pkg:cargo/once_cell@1.18.0", + "referenceType": "purl" + } + ], + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "once_cell", + "versionInfo": "1.18.0" }, { "SPDXID": "SPDXRef-Package-proc-macro2-1.0.64", @@ -450,171 +518,217 @@ ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "proc-macro2" + "name": "proc-macro2", + "versionInfo": "1.0.64" }, { - "SPDXID": "SPDXRef-Package-windows_i686_msvc-0.48.0", - "description": "Import lib for Windows", + "SPDXID": "SPDXRef-Package-syn-2.0.25", + "description": "Parser for Rust source code", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_i686_msvc@0.48.0", + "referenceLocator": "pkg:cargo/syn@2.0.25", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_i686_msvc" + "name": "syn", + "versionInfo": "2.0.25" }, { - "SPDXID": "SPDXRef-Package-windows_x86_64_gnu-0.48.0", + "SPDXID": "SPDXRef-Package-linux-raw-sys-0.4.10", + "description": "Generated bindings for Linux's userspace API", + "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceLocator": "pkg:cargo/linux-raw-sys@0.4.10", + "referenceType": "purl" + } + ], + "licenseConcluded": "Apache-2.0 OR Apache-2.0 OR MIT", + "licenseDeclared": "Apache-2.0 OR Apache-2.0 OR MIT", + "name": "linux-raw-sys", + "versionInfo": "0.4.10" + }, + { + "SPDXID": "SPDXRef-Package-windows--aarch64--msvc-0.48.0", "description": "Import lib for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_x86_64_gnu@0.48.0", + "referenceLocator": "pkg:cargo/windows_aarch64_msvc@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_x86_64_gnu" + "name": "windows_aarch64_msvc", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-windows_aarch64_gnullvm-0.48.0", - "description": "Import lib for Windows", + "SPDXID": "SPDXRef-Package-heck-0.4.1", + "description": "heck is a case conversion library.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/windows_aarch64_gnullvm@0.48.0", + "referenceLocator": "pkg:cargo/heck@0.4.1", "referenceType": "purl" } ], + "homepage": "https://github.com/withoutboats/heck", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "windows_aarch64_gnullvm" + "name": "heck", + "versionInfo": "0.4.1" }, { - "SPDXID": "SPDXRef-Package-bitflags-2.3.3", - "description": "A macro to generate structures which behave like bitflags.\n", + "SPDXID": "SPDXRef-Package-anstyle-wincon-1.0.1", + "description": "Styling legacy Windows terminals", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/bitflags@2.3.3", + "referenceLocator": "pkg:cargo/anstyle-wincon@1.0.1", "referenceType": "purl" } ], - "homepage": "https://github.com/bitflags/bitflags", + "homepage": "https://github.com/rust-cli/anstyle", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "bitflags" + "name": "anstyle-wincon", + "versionInfo": "1.0.1" }, { - "SPDXID": "SPDXRef-Package-syn-2.0.25", - "description": "Parser for Rust source code", + "SPDXID": "SPDXRef-Package-windows-sys-0.48.0", + "description": "Rust for Windows", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/syn@2.0.25", + "referenceLocator": "pkg:cargo/windows-sys@0.48.0", "referenceType": "purl" } ], "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "syn" + "name": "windows-sys", + "versionInfo": "0.48.0" }, { - "SPDXID": "SPDXRef-Package-utf8parse-0.2.1", - "description": "Table-driven UTF-8 parser", + "SPDXID": "SPDXRef-Package-clap--derive-4.3.2", + "description": "Parse command line argument by defining a struct, derive crate.", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/utf8parse@0.2.1", + "referenceLocator": "pkg:cargo/clap_derive@4.3.2", "referenceType": "purl" } ], - "licenseConcluded": "Apache-2.0 OR MIT", - "licenseDeclared": "Apache-2.0 OR MIT", - "name": "utf8parse" + "licenseConcluded": "MIT OR Apache-2.0", + "licenseDeclared": "MIT OR Apache-2.0", + "name": "clap_derive", + "versionInfo": "4.3.2" }, { - "SPDXID": "SPDXRef-Package-anstyle-wincon-1.0.1", - "description": "Styling legacy Windows terminals", + "SPDXID": "SPDXRef-Package-bitflags-2.4.1", + "description": "A macro to generate structures which behave like bitflags.\n", "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", "externalRefs": [ { "referenceCategory": "PACKAGE-MANAGER", - "referenceLocator": "pkg:cargo/anstyle-wincon@1.0.1", + "referenceLocator": "pkg:cargo/bitflags@2.4.1", "referenceType": "purl" } ], - "homepage": "https://github.com/rust-cli/anstyle", + "homepage": "https://github.com/bitflags/bitflags", "licenseConcluded": "MIT OR Apache-2.0", "licenseDeclared": "MIT OR Apache-2.0", - "name": "anstyle-wincon" + "name": "bitflags", + "versionInfo": "2.4.1" + }, + { + "SPDXID": "SPDXRef-Package-errno-dragonfly-0.1.2", + "description": "Exposes errno functionality to stable Rust on DragonFlyBSD", + "downloadLocation": "registry+https://github.com/rust-lang/crates.io-index", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceLocator": "pkg:cargo/errno-dragonfly@0.1.2", + "referenceType": "purl" + } + ], + "licenseConcluded": "MIT", + "licenseDeclared": "MIT", + "name": "errno-dragonfly", + "versionInfo": "0.1.2" } ], "relationships": [ { - "relatedSpdxElement": "SPDXRef-Package-colorchoice-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-clap--lex-0.5.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + "spdxElementId": "SPDXRef-Package-clap--builder-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-utf8parse-0.2.1", - "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstyle-parse-0.2.1" + "relatedSpdxElement": "SPDXRef-Package-cargo-binary-0.1.0", + "relationshipType": "DEV_DEPENDENCY_OF", + "spdxElementId": "SPDXRef-Package-approx-0.5.1" }, { - "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-errno-dragonfly-0.1.2", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-rustix-0.38.3" + "spdxElementId": "SPDXRef-Package-errno-0.3.1" }, { - "relatedSpdxElement": "SPDXRef-Package-clap_lex-0.5.0", + "relatedSpdxElement": "SPDXRef-Package-unicode-ident-1.0.10", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_builder-4.3.11" + "spdxElementId": "SPDXRef-Package-proc-macro2-1.0.64" }, { "relatedSpdxElement": "SPDXRef-Package-quote-1.0.29", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_derive-4.3.2" + "spdxElementId": "SPDXRef-Package-syn-2.0.25" }, { - "relatedSpdxElement": "SPDXRef-Package-rustix-0.38.3", - "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-is-terminal-0.4.9" + "relatedSpdxElement": "SPDXRef-Package-cargo-binary-0.1.0", + "relationshipType": "GENERATED_FROM", + "spdxElementId": "SPDXRef-File-cargo-binary" }, { - "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", - "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstyle-wincon-1.0.1" + "relatedSpdxElement": "SPDXRef-Package-num-traits-0.2.19", + "relationshipType": "BUILD_TOOL_OF", + "spdxElementId": "SPDXRef-Package-autocfg-1.5.0" }, { - "relatedSpdxElement": "SPDXRef-Package-anstyle-wincon-1.0.1", + "relatedSpdxElement": "SPDXRef-Package-bitflags-2.4.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + "spdxElementId": "SPDXRef-Package-rustix-0.38.19" }, { - "relatedSpdxElement": "SPDXRef-Package-anstyle-query-1.0.0", + "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + "spdxElementId": "SPDXRef-Package-rustix-0.38.19" }, { - "relatedSpdxElement": "SPDXRef-Package-clap-4.3.11", + "relatedSpdxElement": "SPDXRef-Package-errno-dragonfly-0.1.2", + "relationshipType": "BUILD_TOOL_OF", + "spdxElementId": "SPDXRef-Package-cc-1.0.79" + }, + { + "relatedSpdxElement": "SPDXRef-Package-clap--builder-4.3.11", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-cargo-binary-0.1.0" + "spdxElementId": "SPDXRef-Package-clap-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-windows-targets-0.48.1", + "relatedSpdxElement": "SPDXRef-Package-anstream-0.3.2", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-windows-sys-0.48.0" + "spdxElementId": "SPDXRef-Package-clap--builder-4.3.11" }, { "relatedSpdxElement": "SPDXRef-Package-unicode-ident-1.0.10", @@ -622,179 +736,194 @@ "spdxElementId": "SPDXRef-Package-syn-2.0.25" }, { - "relatedSpdxElement": "SPDXRef-Package-bitflags-2.3.3", + "relatedSpdxElement": "SPDXRef-Package-strsim-0.10.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-rustix-0.38.3" + "spdxElementId": "SPDXRef-Package-clap--builder-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-once_cell-1.18.0", + "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap-4.3.11" + "spdxElementId": "SPDXRef-Package-quote-1.0.29" }, { - "relatedSpdxElement": "SPDXRef-Package-heck-0.4.1", + "relatedSpdxElement": "SPDXRef-Package-libc-0.2.149", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_derive-4.3.2" + "spdxElementId": "SPDXRef-Package-rustix-0.38.19" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_x86_64_msvc-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-quote-1.0.29", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" + "spdxElementId": "SPDXRef-Package-clap--derive-4.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-is-terminal-0.4.9", + "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", + "relationshipType": "DEPENDS_ON", + "spdxElementId": "SPDXRef-Package-anstyle-wincon-1.0.1" + }, + { + "relatedSpdxElement": "SPDXRef-Package-anstyle-wincon-1.0.1", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-anstream-0.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_i686_msvc-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-windows-targets-0.48.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" + "spdxElementId": "SPDXRef-Package-windows-sys-0.48.0" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_aarch64_msvc-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-windows--i686--gnu-0.48.0", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-hermit-abi-0.3.2", + "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-is-terminal-0.4.9" + "spdxElementId": "SPDXRef-Package-syn-2.0.25" }, { - "relatedSpdxElement": "SPDXRef-Package-errno-dragonfly-0.1.2", + "relatedSpdxElement": "SPDXRef-File-cargo-binary", + "relationshipType": "DESCRIBES", + "spdxElementId": "SPDXRef-DOCUMENT" + }, + { + "relatedSpdxElement": "SPDXRef-Package-colorchoice-1.0.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-errno-0.3.1" + "spdxElementId": "SPDXRef-Package-anstream-0.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", + "relatedSpdxElement": "SPDXRef-Package-windows--i686--msvc-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-quote-1.0.29" + "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", + "relatedSpdxElement": "SPDXRef-Package-num-traits-0.2.19", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-syn-2.0.25" + "spdxElementId": "SPDXRef-Package-approx-0.5.1" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_i686_gnu-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" + "spdxElementId": "SPDXRef-Package-clap--builder-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-libc-0.2.147", + "relatedSpdxElement": "SPDXRef-Package-utf8parse-0.2.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-rustix-0.38.3" + "spdxElementId": "SPDXRef-Package-anstyle-parse-0.2.1" }, { - "relatedSpdxElement": "SPDXRef-Package-cargo-binary-0.1.0", - "relationshipType": "GENERATED_FROM", - "spdxElementId": "SPDXRef-File-cargo-binary" + "relatedSpdxElement": "SPDXRef-Package-windows--x86--64--msvc-0.48.0", + "relationshipType": "DEPENDS_ON", + "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", + "relatedSpdxElement": "SPDXRef-Package-hermit-abi-0.3.2", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_derive-4.3.2" + "spdxElementId": "SPDXRef-Package-is-terminal-0.4.9" }, { - "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-rustix-0.38.19", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-is-terminal-0.4.9" }, { - "relatedSpdxElement": "SPDXRef-Package-libc-0.2.147", + "relatedSpdxElement": "SPDXRef-Package-syn-2.0.25", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-errno-dragonfly-0.1.2" + "spdxElementId": "SPDXRef-Package-clap--derive-4.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-unicode-ident-1.0.10", + "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-proc-macro2-1.0.64" + "spdxElementId": "SPDXRef-Package-anstyle-query-1.0.0" }, { - "relatedSpdxElement": "SPDXRef-Package-errno-0.3.1", + "relatedSpdxElement": "SPDXRef-Package-clap--derive-4.3.2", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-rustix-0.38.3" + "spdxElementId": "SPDXRef-Package-clap-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_aarch64_gnullvm-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-windows--aarch64--gnullvm-0.48.0", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-quote-1.0.29", + "relatedSpdxElement": "SPDXRef-Package-utf8parse-0.2.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-syn-2.0.25" + "spdxElementId": "SPDXRef-Package-anstream-0.3.2" }, { "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-errno-0.3.1" + "spdxElementId": "SPDXRef-Package-is-terminal-0.4.9" }, { - "relatedSpdxElement": "SPDXRef-Package-linux-raw-sys-0.4.3", + "relatedSpdxElement": "SPDXRef-Package-windows--x86--64--gnu-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-rustix-0.38.3" + "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-syn-2.0.25", + "relatedSpdxElement": "SPDXRef-Package-windows--aarch64--msvc-0.48.0", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_derive-4.3.2" + "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" }, { - "relatedSpdxElement": "SPDXRef-Package-utf8parse-0.2.1", + "relatedSpdxElement": "SPDXRef-Package-libc-0.2.149", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + "spdxElementId": "SPDXRef-Package-errno-0.3.1" }, { - "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-proc-macro2-1.0.64", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstyle-query-1.0.0" + "spdxElementId": "SPDXRef-Package-clap--derive-4.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-anstream-0.3.2", + "relatedSpdxElement": "SPDXRef-Package-heck-0.4.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_builder-4.3.11" + "spdxElementId": "SPDXRef-Package-clap--derive-4.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-linux-raw-sys-0.4.10", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-anstyle-wincon-1.0.1" + "spdxElementId": "SPDXRef-Package-rustix-0.38.19" }, { - "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", + "relatedSpdxElement": "SPDXRef-Package-libc-0.2.149", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_builder-4.3.11" + "spdxElementId": "SPDXRef-Package-errno-dragonfly-0.1.2" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_x86_64_gnu-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-clap-4.3.11", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" + "spdxElementId": "SPDXRef-Package-cargo-binary-0.1.0" }, { - "relatedSpdxElement": "SPDXRef-Package-clap_derive-4.3.2", + "relatedSpdxElement": "SPDXRef-Package-once--cell-1.18.0", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-clap-4.3.11" }, { - "relatedSpdxElement": "SPDXRef-Package-clap_builder-4.3.11", + "relatedSpdxElement": "SPDXRef-Package-errno-0.3.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap-4.3.11" + "spdxElementId": "SPDXRef-Package-rustix-0.38.19" }, { - "relatedSpdxElement": "SPDXRef-Package-libc-0.2.147", + "relatedSpdxElement": "SPDXRef-Package-windows-sys-0.48.0", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-errno-0.3.1" }, { - "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", + "relatedSpdxElement": "SPDXRef-Package-is-terminal-0.4.9", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-anstream-0.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-strsim-0.10.0", + "relatedSpdxElement": "SPDXRef-Package-anstyle-query-1.0.0", + "relationshipType": "DEPENDS_ON", + "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + }, + { + "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", "relationshipType": "DEPENDS_ON", - "spdxElementId": "SPDXRef-Package-clap_builder-4.3.11" + "spdxElementId": "SPDXRef-Package-anstyle-wincon-1.0.1" }, { "relatedSpdxElement": "SPDXRef-Package-anstyle-parse-0.2.1", @@ -802,7 +931,12 @@ "spdxElementId": "SPDXRef-Package-anstream-0.3.2" }, { - "relatedSpdxElement": "SPDXRef-Package-windows_x86_64_gnullvm-0.48.0", + "relatedSpdxElement": "SPDXRef-Package-anstyle-1.0.1", + "relationshipType": "DEPENDS_ON", + "spdxElementId": "SPDXRef-Package-anstream-0.3.2" + }, + { + "relatedSpdxElement": "SPDXRef-Package-windows--x86--64--gnullvm-0.48.0", "relationshipType": "DEPENDS_ON", "spdxElementId": "SPDXRef-Package-windows-targets-0.48.1" } diff --git a/examples/cargo-binary/src/main.rs b/examples/cargo-binary/src/main.rs index 577516c..6c0a7e2 100644 --- a/examples/cargo-binary/src/main.rs +++ b/examples/cargo-binary/src/main.rs @@ -1,5 +1,9 @@ use clap::Parser; +fn pi() -> f64 { + 3.1415926 +} + /// Simple program to greet a person #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] @@ -20,3 +24,15 @@ fn main() { println!("Hello {}!", args.name) } } + +#[cfg(test)] +mod tests { + use super::pi; + use approx::assert_abs_diff_eq; + use std::f64::consts::PI; + + #[test] + fn pi_value() { + assert_abs_diff_eq!(pi(), PI, epsilon = 0.001); + } +}