Send unmaintained hardened_malloc-rs to valhalla.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -1596,12 +1596,6 @@ dependencies = [
|
|||||||
"crunchy",
|
"crunchy",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hardened_malloc-rs"
|
|
||||||
version = "0.1.2+12"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "647deb1583b14d160f85f3ff626f20b6edd366e3852c9843b06077388f794cb6"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.15.5"
|
version = "0.15.5"
|
||||||
@@ -4907,7 +4901,6 @@ dependencies = [
|
|||||||
"clap",
|
"clap",
|
||||||
"const-str",
|
"const-str",
|
||||||
"ctor",
|
"ctor",
|
||||||
"hardened_malloc-rs",
|
|
||||||
"log",
|
"log",
|
||||||
"opentelemetry",
|
"opentelemetry",
|
||||||
"opentelemetry_sdk",
|
"opentelemetry_sdk",
|
||||||
@@ -5006,7 +4999,6 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
"figment",
|
"figment",
|
||||||
"futures",
|
"futures",
|
||||||
"hardened_malloc-rs",
|
|
||||||
"http",
|
"http",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"insta",
|
"insta",
|
||||||
|
|||||||
@@ -163,15 +163,6 @@ version = "0.3"
|
|||||||
default-features = false
|
default-features = false
|
||||||
features = ["std", "async-await"]
|
features = ["std", "async-await"]
|
||||||
|
|
||||||
[workspace.dependencies.hardened_malloc-rs]
|
|
||||||
version = "0.1.2"
|
|
||||||
default-features = false
|
|
||||||
features = [
|
|
||||||
"static",
|
|
||||||
"gcc",
|
|
||||||
"light",
|
|
||||||
]
|
|
||||||
|
|
||||||
[workspace.dependencies.hickory-resolver]
|
[workspace.dependencies.hickory-resolver]
|
||||||
version = "0.25"
|
version = "0.25"
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ cargo_feat_sets = {
|
|||||||
# Default features
|
# Default features
|
||||||
default = "brotli_compression,element_hacks,gzip_compression,io_uring,jemalloc,jemalloc_conf,media_thumbnail,release_max_log_level,systemd,url_preview,zstd_compression"
|
default = "brotli_compression,element_hacks,gzip_compression,io_uring,jemalloc,jemalloc_conf,media_thumbnail,release_max_log_level,systemd,url_preview,zstd_compression"
|
||||||
# All features sans release_max_log_level
|
# All features sans release_max_log_level
|
||||||
logging = "blurhashing,brotli_compression,bzip2_compression,console,direct_tls,element_hacks,gzip_compression,hardened_malloc,io_uring,jemalloc,jemalloc_conf,jemalloc_prof,jemalloc_stats,ldap,lz4_compression,media_thumbnail,perf_measurements,sentry_telemetry,systemd,tokio_console,tuwunel_mods,url_preview,zstd_compression"
|
logging = "blurhashing,brotli_compression,bzip2_compression,console,direct_tls,element_hacks,gzip_compression,io_uring,jemalloc,jemalloc_conf,jemalloc_prof,jemalloc_stats,ldap,lz4_compression,media_thumbnail,perf_measurements,sentry_telemetry,systemd,tokio_console,tuwunel_mods,url_preview,zstd_compression"
|
||||||
# All features
|
# All features
|
||||||
all = "blurhashing,brotli_compression,bzip2_compression,console,direct_tls,element_hacks,gzip_compression,hardened_malloc,io_uring,jemalloc,jemalloc_conf,jemalloc_prof,jemalloc_stats,ldap,lz4_compression,media_thumbnail,perf_measurements,release_max_log_level,sentry_telemetry,systemd,tokio_console,tuwunel_mods,url_preview,zstd_compression"
|
all = "blurhashing,brotli_compression,bzip2_compression,console,direct_tls,element_hacks,gzip_compression,io_uring,jemalloc,jemalloc_conf,jemalloc_prof,jemalloc_stats,ldap,lz4_compression,media_thumbnail,perf_measurements,release_max_log_level,sentry_telemetry,systemd,tokio_console,tuwunel_mods,url_preview,zstd_compression"
|
||||||
}
|
}
|
||||||
variable "cargo_features_always" {
|
variable "cargo_features_always" {
|
||||||
default = "direct_tls"
|
default = "direct_tls"
|
||||||
@@ -1637,7 +1637,6 @@ target "kitchen" {
|
|||||||
args = {
|
args = {
|
||||||
packages = join(" ", [
|
packages = join(" ", [
|
||||||
contains(split(",", cargo_feat_sets[feat_set]), "bzip2_compression")? "libbz2-dev": "",
|
contains(split(",", cargo_feat_sets[feat_set]), "bzip2_compression")? "libbz2-dev": "",
|
||||||
contains(split(",", cargo_feat_sets[feat_set]), "hardened_malloc")? "g++": "",
|
|
||||||
contains(split(",", cargo_feat_sets[feat_set]), "io_uring")? "liburing-dev": "",
|
contains(split(",", cargo_feat_sets[feat_set]), "io_uring")? "liburing-dev": "",
|
||||||
contains(split(",", cargo_feat_sets[feat_set]), "jemalloc")? "libjemalloc-dev": "",
|
contains(split(",", cargo_feat_sets[feat_set]), "jemalloc")? "libjemalloc-dev": "",
|
||||||
contains(split(",", cargo_feat_sets[feat_set]), "lz4_compression")? "liblz4-dev": "",
|
contains(split(",", cargo_feat_sets[feat_set]), "lz4_compression")? "liblz4-dev": "",
|
||||||
|
|||||||
54
flake.nix
54
flake.nix
@@ -204,8 +204,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -218,8 +216,6 @@
|
|||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
# this is non-functional on nix for some reason
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -231,8 +227,6 @@
|
|||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
# this is non-functional on nix for some reason
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -246,8 +240,6 @@
|
|||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
# this is non-functional on nix for some reason
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -260,12 +252,9 @@
|
|||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
# this is non-functional on nix for some reason
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
hmalloc = scopeHost.main.override { features = ["hardened_malloc"]; };
|
|
||||||
|
|
||||||
oci-image = scopeHost.oci-image;
|
oci-image = scopeHost.oci-image;
|
||||||
oci-image-all-features = scopeHost.oci-image.override {
|
oci-image-all-features = scopeHost.oci-image.override {
|
||||||
@@ -278,8 +267,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -294,18 +281,11 @@
|
|||||||
disable_features = [
|
disable_features = [
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
oci-image-hmalloc = scopeHost.oci-image.override {
|
|
||||||
main = scopeHost.main.override {
|
|
||||||
features = ["hardened_malloc"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
book = scopeHost.book;
|
book = scopeHost.book;
|
||||||
|
|
||||||
@@ -359,8 +339,6 @@
|
|||||||
disable_features = [
|
disable_features = [
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -379,8 +357,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -400,8 +376,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -420,22 +394,12 @@
|
|||||||
disable_features = [
|
disable_features = [
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
# An output for a statically-linked binary with hardened_malloc
|
|
||||||
{
|
|
||||||
name = "${binaryName}-hmalloc";
|
|
||||||
value = scopeCrossStatic.main.override {
|
|
||||||
features = ["hardened_malloc"];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# An output for an OCI image based on that binary
|
# An output for an OCI image based on that binary
|
||||||
{
|
{
|
||||||
name = "oci-image-${crossSystem}";
|
name = "oci-image-${crossSystem}";
|
||||||
@@ -478,8 +442,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -501,8 +463,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -523,8 +483,6 @@
|
|||||||
disable_features = [
|
disable_features = [
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
@@ -532,16 +490,6 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
# An output for an OCI image based on that binary with hardened_malloc
|
|
||||||
{
|
|
||||||
name = "oci-image-${crossSystem}-hmalloc";
|
|
||||||
value = scopeCrossStatic.oci-image.override {
|
|
||||||
main = scopeCrossStatic.main.override {
|
|
||||||
features = ["hardened_malloc"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# An output for a complement OCI image for the specified platform
|
# An output for a complement OCI image for the specified platform
|
||||||
{
|
{
|
||||||
name = "complement-${crossSystem}";
|
name = "complement-${crossSystem}";
|
||||||
@@ -571,8 +519,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
# be expected on non-debug builds.
|
# be expected on non-debug builds.
|
||||||
"jemalloc_prof"
|
"jemalloc_prof"
|
||||||
"jemalloc_stats"
|
"jemalloc_stats"
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# tuwunel_mods is a development-only hot reload feature
|
# tuwunel_mods is a development-only hot reload feature
|
||||||
"tuwunel_mods"
|
"tuwunel_mods"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ tuwunel_mods = [
|
|||||||
gzip_compression = [
|
gzip_compression = [
|
||||||
"reqwest/gzip",
|
"reqwest/gzip",
|
||||||
]
|
]
|
||||||
hardened_malloc = [
|
|
||||||
"dep:hardened_malloc-rs"
|
|
||||||
]
|
|
||||||
jemalloc = [
|
jemalloc = [
|
||||||
"dep:tikv-jemalloc-sys",
|
"dep:tikv-jemalloc-sys",
|
||||||
"dep:tikv-jemalloc-ctl",
|
"dep:tikv-jemalloc-ctl",
|
||||||
@@ -114,10 +111,6 @@ url.workspace = true
|
|||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix.workspace = true
|
nix.workspace = true
|
||||||
|
|
||||||
[target.'cfg(all(not(target_env = "msvc"), target_os = "linux"))'.dependencies]
|
|
||||||
hardened_malloc-rs.workspace = true
|
|
||||||
hardened_malloc-rs.optional = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
insta.workspace = true
|
insta.workspace = true
|
||||||
maplit.workspace = true
|
maplit.workspace = true
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
//! hmalloc allocator
|
|
||||||
|
|
||||||
#[global_allocator]
|
|
||||||
static HMALLOC: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;
|
|
||||||
|
|
||||||
pub fn trim<I: Into<Option<usize>>>(_: I) -> crate::Result { Ok(()) }
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
//TODO: get usage
|
|
||||||
pub fn memory_usage() -> Option<String> { None }
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn memory_stats(_opts: &str) -> Option<String> {
|
|
||||||
Some("Extended statistics are not available from hardened_malloc.".to_owned())
|
|
||||||
}
|
|
||||||
@@ -6,26 +6,7 @@ pub mod je;
|
|||||||
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
|
||||||
pub use je::{memory_stats, memory_usage, trim};
|
pub use je::{memory_stats, memory_usage, trim};
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
|
||||||
not(target_env = "msvc"),
|
|
||||||
feature = "hardened_malloc",
|
|
||||||
not(feature = "jemalloc")
|
|
||||||
))]
|
|
||||||
pub mod hardened;
|
|
||||||
#[cfg(all(
|
|
||||||
not(target_env = "msvc"),
|
|
||||||
feature = "hardened_malloc",
|
|
||||||
not(feature = "jemalloc")
|
|
||||||
))]
|
|
||||||
pub use hardened::{memory_stats, memory_usage, trim};
|
|
||||||
|
|
||||||
#[cfg(any(
|
|
||||||
target_env = "msvc",
|
|
||||||
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
|
|
||||||
))]
|
|
||||||
pub mod default;
|
pub mod default;
|
||||||
#[cfg(any(
|
#[cfg(any(target_env = "msvc", not(feature = "jemalloc")))]
|
||||||
target_env = "msvc",
|
|
||||||
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
|
|
||||||
))]
|
|
||||||
pub use default::{memory_stats, memory_usage, trim};
|
pub use default::{memory_stats, memory_usage, trim};
|
||||||
|
|||||||
@@ -100,9 +100,6 @@ gzip_compression = [
|
|||||||
"tuwunel-router/gzip_compression",
|
"tuwunel-router/gzip_compression",
|
||||||
"tuwunel-service/gzip_compression",
|
"tuwunel-service/gzip_compression",
|
||||||
]
|
]
|
||||||
hardened_malloc = [
|
|
||||||
"tuwunel-core/hardened_malloc",
|
|
||||||
]
|
|
||||||
io_uring = [
|
io_uring = [
|
||||||
"tuwunel-admin/io_uring",
|
"tuwunel-admin/io_uring",
|
||||||
"tuwunel-api/io_uring",
|
"tuwunel-api/io_uring",
|
||||||
@@ -236,10 +233,6 @@ tracing-opentelemetry.workspace = true
|
|||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|
||||||
[target.'cfg(all(not(target_env = "msvc"), target_os = "linux"))'.dependencies]
|
|
||||||
hardened_malloc-rs.workspace = true
|
|
||||||
hardened_malloc-rs.optional = true
|
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user