rustsec/
lib.rs

1#![doc = include_str!("../README.md")]
2#![doc(html_logo_url = "https://raw.githubusercontent.com/RustSec/logos/main/rustsec-logo-lg.png")]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![forbid(unsafe_code)]
5#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
6
7#[macro_use]
8mod error;
9
10pub mod advisory;
11mod collection;
12pub mod database;
13mod fixer;
14pub mod osv;
15pub mod report;
16pub mod repository;
17mod vulnerability;
18mod warning;
19
20pub mod binary_scanning;
21
22#[cfg(feature = "git")]
23#[cfg_attr(docsrs, doc(cfg(feature = "git")))]
24mod cached_index;
25
26#[cfg(feature = "git")]
27#[cfg_attr(docsrs, doc(cfg(feature = "git")))]
28pub mod registry {
29    //! Support for interacting with the local crates.io registry index
30    pub use super::cached_index::{CachedIndex, ClientBuilder};
31}
32
33pub use cargo_lock::{self, package, Lockfile, SourceId};
34pub use fs_err as fs;
35pub use platforms;
36pub use semver::{self, Version, VersionReq};
37
38pub use crate::{
39    advisory::Advisory,
40    collection::Collection,
41    database::Database,
42    error::{Error, ErrorKind, Result},
43    report::Report,
44    vulnerability::Vulnerability,
45    warning::{Warning, WarningKind},
46};
47
48pub use crate::fixer::Fixer;
49
50#[cfg(feature = "git")]
51pub use crate::repository::git::Repository;
52
53// Use BTreeMap and BTreeSet as our map and set types
54use std::collections::{btree_map as map, btree_set as set, BTreeMap as Map, BTreeSet as Set};
55
56/// Current version of the RustSec crate
57pub const VERSION: &str = env!("CARGO_PKG_VERSION");