disable more unnecessary features in various build outputs
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
d5217566d9
commit
e524590860
3 changed files with 115 additions and 55 deletions
106
flake.nix
106
flake.nix
|
@ -191,27 +191,57 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
default = scopeHost.main;
|
default = scopeHost.main.override {
|
||||||
default-debug = scopeHost.main.override {
|
|
||||||
profile = "dev";
|
|
||||||
# debug build users expect full logs
|
|
||||||
disable_release_max_log_level = true;
|
|
||||||
};
|
|
||||||
default-test = scopeHost.main.override {
|
|
||||||
profile = "test";
|
|
||||||
disable_release_max_log_level = true;
|
|
||||||
};
|
|
||||||
all-features = scopeHost.main.override {
|
|
||||||
all_features = true;
|
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
|
"conduwuit_mods"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
default-debug = scopeHost.main.override {
|
||||||
|
profile = "dev";
|
||||||
|
# debug build users expect full logs
|
||||||
|
disable_release_max_log_level = true;
|
||||||
|
disable_features = [
|
||||||
|
# dont include experimental features
|
||||||
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
|
"conduwuit_mods"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# just a test profile used for things like CI and complement
|
||||||
|
default-test = scopeHost.main.override {
|
||||||
|
profile = "test";
|
||||||
|
disable_release_max_log_level = true;
|
||||||
|
disable_features = [
|
||||||
|
# dont include experimental features
|
||||||
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
|
"conduwuit_mods"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
all-features = scopeHost.main.override {
|
||||||
|
all_features = true;
|
||||||
|
disable_features = [
|
||||||
|
# dont include experimental features
|
||||||
|
"experimental"
|
||||||
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
|
# be expected on non-debug builds.
|
||||||
|
"jemalloc_prof"
|
||||||
|
"jemalloc_stats"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -222,10 +252,10 @@
|
||||||
# debug build users expect full logs
|
# debug build users expect full logs
|
||||||
disable_release_max_log_level = true;
|
disable_release_max_log_level = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -237,14 +267,14 @@
|
||||||
main = scopeHost.main.override {
|
main = scopeHost.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -257,10 +287,10 @@
|
||||||
# debug build users expect full logs
|
# debug build users expect full logs
|
||||||
disable_release_max_log_level = true;
|
disable_release_max_log_level = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -321,6 +351,14 @@
|
||||||
value = scopeCrossStatic.main.override {
|
value = scopeCrossStatic.main.override {
|
||||||
profile = "test";
|
profile = "test";
|
||||||
disable_release_max_log_level = true;
|
disable_release_max_log_level = true;
|
||||||
|
disable_features = [
|
||||||
|
# dont include experimental features
|
||||||
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
|
"conduwuit_mods"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,14 +368,14 @@
|
||||||
value = scopeCrossStatic.main.override {
|
value = scopeCrossStatic.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -351,14 +389,14 @@
|
||||||
value = scopeCrossStatic.main.override {
|
value = scopeCrossStatic.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -375,10 +413,10 @@
|
||||||
# debug build users expect full logs
|
# debug build users expect full logs
|
||||||
disable_release_max_log_level = true;
|
disable_release_max_log_level = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -429,14 +467,14 @@
|
||||||
main = scopeCrossStatic.main.override {
|
main = scopeCrossStatic.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -452,14 +490,14 @@
|
||||||
main = scopeCrossStatic.main.override {
|
main = scopeCrossStatic.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -478,10 +516,10 @@
|
||||||
# debug build users expect full logs
|
# debug build users expect full logs
|
||||||
disable_release_max_log_level = true;
|
disable_release_max_log_level = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
@ -522,14 +560,14 @@
|
||||||
main = prev.main.override {
|
main = prev.main.override {
|
||||||
all_features = true;
|
all_features = true;
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# this is non-functional on nix for some reason
|
|
||||||
"hardened_malloc"
|
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
# jemalloc profiling/stats features are expensive and shouldn't
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
# 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"
|
||||||
# conduwuit_mods is a development-only hot reload feature
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
"conduwuit_mods"
|
"conduwuit_mods"
|
||||||
];
|
];
|
||||||
|
|
|
@ -20,6 +20,8 @@ let
|
||||||
disable_features = [
|
disable_features = [
|
||||||
# no reason to use jemalloc for complement, just has compatibility/build issues
|
# no reason to use jemalloc for complement, just has compatibility/build issues
|
||||||
"jemalloc"
|
"jemalloc"
|
||||||
|
"jemalloc_stats"
|
||||||
|
"jemalloc_prof"
|
||||||
# console/CLI stuff isn't used or relevant for complement
|
# console/CLI stuff isn't used or relevant for complement
|
||||||
"console"
|
"console"
|
||||||
"tokio_console"
|
"tokio_console"
|
||||||
|
@ -32,6 +34,14 @@ let
|
||||||
"hardened_malloc"
|
"hardened_malloc"
|
||||||
# dont include experimental features
|
# dont include experimental features
|
||||||
"experimental"
|
"experimental"
|
||||||
|
# compression isn't needed for complement
|
||||||
|
"brotli_compression"
|
||||||
|
"gzip_compression"
|
||||||
|
"zstd_compression"
|
||||||
|
# complement doesn't need hot reloading
|
||||||
|
"conduwuit_mods"
|
||||||
|
# complement doesn't have URL preview media tests
|
||||||
|
"url_preview"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,19 @@
|
||||||
# Options (keep sorted)
|
# Options (keep sorted)
|
||||||
, all_features ? false
|
, all_features ? false
|
||||||
, default_features ? true
|
, default_features ? true
|
||||||
, disable_features ? []
|
# default list of disabled features
|
||||||
|
, disable_features ? [
|
||||||
|
# dont include experimental features
|
||||||
|
"experimental"
|
||||||
|
# jemalloc profiling/stats features are expensive and shouldn't
|
||||||
|
# be expected on non-debug builds.
|
||||||
|
"jemalloc_prof"
|
||||||
|
"jemalloc_stats"
|
||||||
|
# this is non-functional on nix for some reason
|
||||||
|
"hardened_malloc"
|
||||||
|
# conduwuit_mods is a development-only hot reload feature
|
||||||
|
"conduwuit_mods"
|
||||||
|
]
|
||||||
, disable_release_max_log_level ? false
|
, disable_release_max_log_level ? false
|
||||||
, features ? []
|
, features ? []
|
||||||
, profile ? "release"
|
, profile ? "release"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue