Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 129 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ bytes = "1.5"
bytesize = "1.3"
chrono = { version = "0.4.35", default-features = false }
clap = "4"
moka = "0.12.10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you consider also exposing moka expiration policies TTL and TTI as env vars ? I was hoping that we can control both time and mem dimensions ... Moka looks great!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah was considering it. But at least as this PR is, we should be able to avoid blowing up the memory usage which was the main goal of this PR.

concat-idents = "1"
cpe = "0.1.5"
criterion = "0.5.1"
csaf = { version = "0.5.0", default-features = false }
csaf-walker = { version = "0.10.0", default-features = false }
cve = "0.3.1"
deepsize = "0.2.0"
env_logger = "0.11.0"
fixedbitset = "0.5.7"
futures = "0.3.30"
Expand Down Expand Up @@ -207,3 +209,6 @@ langchain-rust = { git = "https://github.com/chirino/langchain-rust", branch = "

# to pickup fix: https://github.com/eikendev/sectxt/issues/21
sectxtlib = { git = "https://github.com/ctron/sectxt", branch = "feature/fix_deps_1" }

# to pickup feat: https://github.com/Aeledfyr/deepsize/pull/41
deepsize = { git = "https://github.com/chirino/deepsize", branch = "main" }
1 change: 1 addition & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ bytesize = { workspace = true, features = ["serde"] }
chrono = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
cpe = { workspace = true }
deepsize = { workspace = true }
hex = { workspace = true }
human-date-parser = { workspace = true }
itertools = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion common/src/cpe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use cpe::{
cpe::Cpe as _,
uri::{OwnedUri, Uri},
};
use deepsize::DeepSizeOf;
use serde::{
de::{Error, Visitor},
Deserialize, Deserializer, Serialize, Serializer,
Expand All @@ -17,7 +18,7 @@ use utoipa::{
};
use uuid::Uuid;

#[derive(Clone, Hash, Eq, PartialEq)]
#[derive(Clone, Hash, Eq, PartialEq, DeepSizeOf)]
pub struct Cpe {
uri: OwnedUri,
}
Expand Down
3 changes: 2 additions & 1 deletion common/src/purl.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use deepsize::DeepSizeOf;
use packageurl::PackageUrl;
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
use serde::{
Expand Down Expand Up @@ -25,7 +26,7 @@ pub enum PurlErr {
Package(#[from] packageurl::Error),
}

#[derive(Clone, PartialEq, Eq, Hash)]
#[derive(Clone, PartialEq, Eq, Hash, DeepSizeOf)]
pub struct Purl {
pub ty: String,
pub namespace: Option<String>,
Expand Down
Loading