diff --git a/Cargo.lock b/Cargo.lock index 89dd71398..022aea768 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2341,9 +2341,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" @@ -3135,11 +3132,11 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.8" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.14.5", ] [[package]] diff --git a/async_ossl/Cargo.toml b/async_ossl/Cargo.toml index b52df89c3..e5d77c319 100644 --- a/async_ossl/Cargo.toml +++ b/async_ossl/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" resolver = "2" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/base91/Cargo.toml b/base91/Cargo.toml index 4f01e2a5a..e3e2a0f03 100644 --- a/base91/Cargo.toml +++ b/base91/Cargo.toml @@ -3,5 +3,6 @@ authors = ["Wez Furlong "] name = "base91" version = "0.1.0" edition = "2018" +publish = false [dependencies] diff --git a/bidi/generate/Cargo.toml b/bidi/generate/Cargo.toml index b5cf44c46..385624483 100644 --- a/bidi/generate/Cargo.toml +++ b/bidi/generate/Cargo.toml @@ -2,6 +2,7 @@ name = "generate-bidi" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/bintree/Cargo.toml b/bintree/Cargo.toml index 56398023c..b1e37431f 100644 --- a/bintree/Cargo.toml +++ b/bintree/Cargo.toml @@ -3,6 +3,7 @@ name = "bintree" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/codec/Cargo.toml b/codec/Cargo.toml index 6ba4a6d80..52b250176 100644 --- a/codec/Cargo.toml +++ b/codec/Cargo.toml @@ -3,6 +3,7 @@ name = "codec" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/config/Cargo.toml b/config/Cargo.toml index 0a38f1e67..0adefcc92 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -3,6 +3,7 @@ name = "config" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/deny.toml b/deny.toml new file mode 100644 index 000000000..7a9290cd4 --- /dev/null +++ b/deny.toml @@ -0,0 +1,245 @@ +# This template contains all of the possible sections and their default values + +# Note that all fields that take a lint level have these possible values: +# * deny - An error will be produced and the check will fail +# * warn - A warning will be produced, but the check will not fail +# * allow - No warning or error will be produced, though in some cases a note +# will be + +# The values provided in this template are the default values that will be used +# when any section or field is not specified in your own configuration + +# Root options + +# The graph table configures how the dependency graph is constructed and thus +# which crates the checks are performed against +[graph] +# If 1 or more target triples (and optionally, target_features) are specified, +# only the specified targets will be checked when running `cargo deny check`. +# This means, if a particular package is only ever used as a target specific +# dependency, such as, for example, the `nix` crate only being used via the +# `target_family = "unix"` configuration, that only having windows targets in +# this list would mean the nix crate, as well as any of its exclusive +# dependencies not shared by any other crates, would be ignored, as the target +# list here is effectively saying which targets you are building for. +targets = [ + # The triple can be any string, but only the target triples built in to + # rustc (as of 1.40) can be checked against actual config expressions + #"x86_64-unknown-linux-musl", + # You can also specify which target_features you promise are enabled for a + # particular target. target_features are currently not validated against + # the actual valid features supported by the target architecture. + #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, +] +# When creating the dependency graph used as the source of truth when checks are +# executed, this field can be used to prune crates from the graph, removing them +# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate +# is pruned from the graph, all of its dependencies will also be pruned unless +# they are connected to another crate in the graph that hasn't been pruned, +# so it should be used with care. The identifiers are [Package ID Specifications] +# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html) +#exclude = [] +# If true, metadata will be collected with `--all-features`. Note that this can't +# be toggled off if true, if you want to conditionally enable `--all-features` it +# is recommended to pass `--all-features` on the cmd line instead +all-features = false +# If true, metadata will be collected with `--no-default-features`. The same +# caveat with `all-features` applies +no-default-features = false +# If set, these feature will be enabled when collecting metadata. If `--features` +# is specified on the cmd line they will take precedence over this option. +#features = [] + +# The output table provides options for how/if diagnostics are outputted +[output] +# When outputting inclusion graphs in diagnostics that include features, this +# option can be used to specify the depth at which feature edges will be added. +# This option is included since the graphs can be quite large and the addition +# of features from the crate(s) to all of the graph roots can be far too verbose. +# This option can be overridden via `--feature-depth` on the cmd line +feature-depth = 1 + +# This section is considered when running `cargo deny check advisories` +# More documentation for the advisories section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html +[advisories] +# The path where the advisory databases are cloned/fetched into +#db-path = "$CARGO_HOME/advisory-dbs" +# The url(s) of the advisory databases to use +#db-urls = ["https://github.com/rustsec/advisory-db"] +# A list of advisory IDs to ignore. Note that ignored advisories will still +# output a note when they are encountered. +ignore = [ + #"RUSTSEC-0000-0000", + #{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" }, + #"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish + #{ crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" }, +] +# If this is true, then cargo deny will use the git executable to fetch advisory database. +# If this is false, then it uses a built-in git library. +# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. +# See Git Authentication for more information about setting up git authentication. +#git-fetch-with-cli = true + +# This section is considered when running `cargo deny check licenses` +# More documentation for the licenses section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html +[licenses] +# List of explicitly allowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +allow = [ + "MIT", + "Apache-2.0", + "LGPL-2.1", + "Unicode-DFS-2016", + "Zlib", + "BSD-2-Clause", + "BSD-3-Clause", + "MPL-2.0", + "ISC", + "CC0-1.0", + "WTFPL", + "Apache-2.0 WITH LLVM-exception", + "OpenSSL", +] +# The confidence threshold for detecting a license from license text. +# The higher the value, the more closely the license text must be to the +# canonical license text of a valid SPDX license file. +# [possible values: any between 0.0 and 1.0]. +confidence-threshold = 0.8 +# Allow 1 or more licenses on a per-crate basis, so that particular licenses +# aren't accepted for every possible crate as with the normal allow list +exceptions = [ + # Each entry is the crate and version constraint, and its specific allow + # list + #{ allow = ["Zlib"], crate = "adler32" }, +] + +# Some crates don't have (easily) machine readable licensing information, +# adding a clarification entry for it allows you to manually specify the +# licensing information +[[licenses.clarify]] +# The package spec the clarification applies to +crate = "ring" +# The SPDX expression for the license requirements of the crate +expression = "MIT AND ISC AND OpenSSL" +# One or more files in the crate's source used as the "source of truth" for +# the license expression. If the contents match, the clarification will be used +# when running the license check, otherwise the clarification will be ignored +# and the crate will be checked normally, which may produce warnings or errors +# depending on the rest of your configuration +license-files = [ +# Each entry is a crate relative path, and the (opaque) hash of its contents +{ path = "LICENSE", hash = 0xbd0eed23 } +] + +[licenses.private] +# If true, ignores workspace crates that aren't published, or are only +# published to private registries. +# To see how to mark a crate as unpublished (to the official registry), +# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. +ignore = true +# One or more private registries that you might publish crates to, if a crate +# is only published to private registries, and ignore is true, the crate will +# not have its license(s) checked +registries = [ + #"https://sekretz.com/registry +] + +# This section is considered when running `cargo deny check bans`. +# More documentation about the 'bans' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html +[bans] +# Lint level for when multiple versions of the same crate are detected +multiple-versions = "warn" +# Lint level for when a crate version requirement is `*` +wildcards = "allow" +# The graph highlighting used when creating dotgraphs for crates +# with multiple versions +# * lowest-version - The path to the lowest versioned duplicate is highlighted +# * simplest-path - The path to the version with the fewest edges is highlighted +# * all - Both lowest-version and simplest-path are used +highlight = "all" +# The default lint level for `default` features for crates that are members of +# the workspace that is being checked. This can be overridden by allowing/denying +# `default` on a crate-by-crate basis if desired. +workspace-default-features = "allow" +# The default lint level for `default` features for external crates that are not +# members of the workspace. This can be overridden by allowing/denying `default` +# on a crate-by-crate basis if desired. +external-default-features = "allow" +# List of crates that are allowed. Use with care! +allow = [ + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is allowed" }, +] +# List of crates to deny +deny = [ + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is banned" }, + # Wrapper crates can optionally be specified to allow the crate when it + # is a direct dependency of the otherwise banned crate + #{ crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, +] + +# List of features to allow/deny +# Each entry the name of a crate and a version range. If version is +# not specified, all versions will be matched. +#[[bans.features]] +#crate = "reqwest" +# Features to not allow +#deny = ["json"] +# Features to allow +#allow = [ +# "rustls", +# "__rustls", +# "__tls", +# "hyper-rustls", +# "rustls", +# "rustls-pemfile", +# "rustls-tls-webpki-roots", +# "tokio-rustls", +# "webpki-roots", +#] +# If true, the allowed features must exactly match the enabled feature set. If +# this is set there is no point setting `deny` +#exact = true + +# Certain crates/versions that will be skipped when doing duplicate detection. +skip = [ + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason why it can't be updated/removed" }, +] +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite. +skip-tree = [ + #"ansi_term@0.11.0", # will be skipped along with _all_ of its direct and transitive dependencies + #{ crate = "ansi_term@0.11.0", depth = 20 }, +] + +# This section is considered when running `cargo deny check sources`. +# More documentation about the 'sources' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html +[sources] +# Lint level for what to happen when a crate from a crate registry that is not +# in the allow list is encountered +unknown-registry = "warn" +# Lint level for what to happen when a crate from a git repository that is not +# in the allow list is encountered +unknown-git = "warn" +# List of URLs for allowed crate registries. Defaults to the crates.io index +# if not specified. If it is specified but empty, no registries are allowed. +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +# List of URLs for allowed Git repositories +allow-git = [] + +[sources.allow-org] +# 1 or more github.com organizations to allow git sources for +github = [""] +# 1 or more gitlab.com organizations to allow git sources for +gitlab = [""] +# 1 or more bitbucket.org organizations to allow git sources for +bitbucket = [""] diff --git a/deps/fontconfig/Cargo.toml b/deps/fontconfig/Cargo.toml index 36b0966a0..0eb860833 100644 --- a/deps/fontconfig/Cargo.toml +++ b/deps/fontconfig/Cargo.toml @@ -5,6 +5,7 @@ version = "0.1.0" edition = "2018" links = "fontconfig" build = "build.rs" +publish = false [dependencies] libc = "~0.2" diff --git a/deps/freetype/Cargo.toml b/deps/freetype/Cargo.toml index 41ffbaad9..81730ff97 100644 --- a/deps/freetype/Cargo.toml +++ b/deps/freetype/Cargo.toml @@ -5,6 +5,7 @@ version = "0.1.0" edition = "2018" links = "freetype" build = "build.rs" +publish = false [dependencies] fixed = "1.23" diff --git a/deps/harfbuzz/Cargo.toml b/deps/harfbuzz/Cargo.toml index 66e32fd8a..be3a470d8 100644 --- a/deps/harfbuzz/Cargo.toml +++ b/deps/harfbuzz/Cargo.toml @@ -5,6 +5,7 @@ version = "0.1.0" edition = "2018" links = "harfbuzz" build = "build.rs" +publish = false [dependencies] freetype = { path = "../freetype" } diff --git a/env-bootstrap/Cargo.toml b/env-bootstrap/Cargo.toml index d48e7df05..1e7cf6db7 100644 --- a/env-bootstrap/Cargo.toml +++ b/env-bootstrap/Cargo.toml @@ -3,6 +3,7 @@ name = "env-bootstrap" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/frecency/Cargo.toml b/frecency/Cargo.toml index 0167d64f1..eea2a8d92 100644 --- a/frecency/Cargo.toml +++ b/frecency/Cargo.toml @@ -2,6 +2,7 @@ name = "frecency" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lfucache/Cargo.toml b/lfucache/Cargo.toml index 03347ae43..ce861ec41 100644 --- a/lfucache/Cargo.toml +++ b/lfucache/Cargo.toml @@ -2,6 +2,7 @@ name = "lfucache" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/battery/Cargo.toml b/lua-api-crates/battery/Cargo.toml index 4887a1eac..30b4167fd 100644 --- a/lua-api-crates/battery/Cargo.toml +++ b/lua-api-crates/battery/Cargo.toml @@ -2,6 +2,7 @@ name = "battery" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/color-funcs/Cargo.toml b/lua-api-crates/color-funcs/Cargo.toml index 18a7985a5..7976c4f92 100644 --- a/lua-api-crates/color-funcs/Cargo.toml +++ b/lua-api-crates/color-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "color-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,7 +14,7 @@ deltae = "0.3" image = "0.25" lazy_static = "1.4" log = "0.4" -lru = "0.7" +lru = "0.12" luahelper = { path = "../../luahelper" } plist = "1.3" serde = {version="1.0", features=["derive"]} diff --git a/lua-api-crates/color-funcs/src/image_colors.rs b/lua-api-crates/color-funcs/src/image_colors.rs index 905f72c1c..d56967096 100644 --- a/lua-api-crates/color-funcs/src/image_colors.rs +++ b/lua-api-crates/color-funcs/src/image_colors.rs @@ -18,6 +18,7 @@ use deltae::LabValue; use image::Pixel; use lru::LruCache; use luahelper::impl_lua_conversion_dynamic; +use std::num::NonZeroUsize; use std::collections::HashMap; use std::sync::Mutex; use std::time::SystemTime; @@ -128,7 +129,7 @@ struct CachedAnalysis { } lazy_static::lazy_static! { - static ref IMG_COLOR_CACHE: Mutex> = Mutex::new(LruCache::new(16)); + static ref IMG_COLOR_CACHE: Mutex> = Mutex::new(LruCache::new(NonZeroUsize::new(16).unwrap())); } fn color_diff_lab(a: &LabValue, b: &LabValue) -> f32 { diff --git a/lua-api-crates/filesystem/Cargo.toml b/lua-api-crates/filesystem/Cargo.toml index 49a7f78f7..fbbebbc9e 100644 --- a/lua-api-crates/filesystem/Cargo.toml +++ b/lua-api-crates/filesystem/Cargo.toml @@ -2,6 +2,7 @@ name = "filesystem" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/logging/Cargo.toml b/lua-api-crates/logging/Cargo.toml index 3f59dc8fc..e9f32f3f3 100644 --- a/lua-api-crates/logging/Cargo.toml +++ b/lua-api-crates/logging/Cargo.toml @@ -2,6 +2,7 @@ name = "logging" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/mux/Cargo.toml b/lua-api-crates/mux/Cargo.toml index 9fc5f0045..8595760a5 100644 --- a/lua-api-crates/mux/Cargo.toml +++ b/lua-api-crates/mux/Cargo.toml @@ -2,6 +2,7 @@ name = "mux-lua" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/plugin/Cargo.toml b/lua-api-crates/plugin/Cargo.toml index cc4f276e3..b181a59a0 100644 --- a/lua-api-crates/plugin/Cargo.toml +++ b/lua-api-crates/plugin/Cargo.toml @@ -2,6 +2,7 @@ name = "plugin" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/procinfo-funcs/Cargo.toml b/lua-api-crates/procinfo-funcs/Cargo.toml index acd7a6535..4c5aeb595 100644 --- a/lua-api-crates/procinfo-funcs/Cargo.toml +++ b/lua-api-crates/procinfo-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "procinfo-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/serde-funcs/Cargo.toml b/lua-api-crates/serde-funcs/Cargo.toml index 0b624b097..5b44aca38 100644 --- a/lua-api-crates/serde-funcs/Cargo.toml +++ b/lua-api-crates/serde-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "serde-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/share-data/Cargo.toml b/lua-api-crates/share-data/Cargo.toml index 8304b8923..8f71238f6 100644 --- a/lua-api-crates/share-data/Cargo.toml +++ b/lua-api-crates/share-data/Cargo.toml @@ -2,6 +2,7 @@ name = "share-data" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/spawn-funcs/Cargo.toml b/lua-api-crates/spawn-funcs/Cargo.toml index 4777c2068..f8aef21be 100644 --- a/lua-api-crates/spawn-funcs/Cargo.toml +++ b/lua-api-crates/spawn-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "spawn-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/ssh-funcs/Cargo.toml b/lua-api-crates/ssh-funcs/Cargo.toml index 190c9c8a9..2abec4256 100644 --- a/lua-api-crates/ssh-funcs/Cargo.toml +++ b/lua-api-crates/ssh-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "ssh-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/termwiz-funcs/Cargo.toml b/lua-api-crates/termwiz-funcs/Cargo.toml index 33a6e048a..b7f264132 100644 --- a/lua-api-crates/termwiz-funcs/Cargo.toml +++ b/lua-api-crates/termwiz-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "termwiz-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/time-funcs/Cargo.toml b/lua-api-crates/time-funcs/Cargo.toml index 11cbb982f..d95cc5cd8 100644 --- a/lua-api-crates/time-funcs/Cargo.toml +++ b/lua-api-crates/time-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "time-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/url-funcs/Cargo.toml b/lua-api-crates/url-funcs/Cargo.toml index 37e5f370b..a0a94cbb7 100644 --- a/lua-api-crates/url-funcs/Cargo.toml +++ b/lua-api-crates/url-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "url-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lua-api-crates/window-funcs/Cargo.toml b/lua-api-crates/window-funcs/Cargo.toml index 11b38bb2a..e770a8195 100644 --- a/lua-api-crates/window-funcs/Cargo.toml +++ b/lua-api-crates/window-funcs/Cargo.toml @@ -2,6 +2,7 @@ name = "window-funcs" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/luahelper/Cargo.toml b/luahelper/Cargo.toml index e9c6dac54..7d2ef94fe 100644 --- a/luahelper/Cargo.toml +++ b/luahelper/Cargo.toml @@ -3,6 +3,7 @@ name = "luahelper" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/mux/Cargo.toml b/mux/Cargo.toml index 8640cecfd..d7cd3c2e5 100644 --- a/mux/Cargo.toml +++ b/mux/Cargo.toml @@ -3,6 +3,7 @@ name = "mux" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/procinfo/Cargo.toml b/procinfo/Cargo.toml index a1320a130..f5a550eff 100644 --- a/procinfo/Cargo.toml +++ b/procinfo/Cargo.toml @@ -2,6 +2,7 @@ name = "procinfo" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] diff --git a/promise/Cargo.toml b/promise/Cargo.toml index 1f4a0248a..67639b085 100644 --- a/promise/Cargo.toml +++ b/promise/Cargo.toml @@ -3,6 +3,7 @@ authors = ["Wez Furlong "] name = "promise" version = "0.2.0" edition = "2018" +publish = false [dependencies] async-task = "4.0" diff --git a/rangeset/Cargo.toml b/rangeset/Cargo.toml index a31fb973f..b82cface1 100644 --- a/rangeset/Cargo.toml +++ b/rangeset/Cargo.toml @@ -3,6 +3,7 @@ name = "rangeset" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false [dependencies] num = "0.3" diff --git a/ratelim/Cargo.toml b/ratelim/Cargo.toml index 5bf163ccc..7b1cdb4c7 100644 --- a/ratelim/Cargo.toml +++ b/ratelim/Cargo.toml @@ -3,6 +3,7 @@ name = "ratelim" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/strip-ansi-escapes/Cargo.toml b/strip-ansi-escapes/Cargo.toml index 6e6414dfa..787b98f1f 100644 --- a/strip-ansi-escapes/Cargo.toml +++ b/strip-ansi-escapes/Cargo.toml @@ -3,6 +3,7 @@ name = "strip-ansi-escapes" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/sync-color-schemes/Cargo.toml b/sync-color-schemes/Cargo.toml index 8e06784a7..31e228e05 100644 --- a/sync-color-schemes/Cargo.toml +++ b/sync-color-schemes/Cargo.toml @@ -2,6 +2,7 @@ name = "sync-color-schemes" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/term/Cargo.toml b/term/Cargo.toml index 23de51d16..7f75afa0d 100644 --- a/term/Cargo.toml +++ b/term/Cargo.toml @@ -25,7 +25,7 @@ hex = "0.4" image = "0.25" lazy_static = "1.4" log = "0.4" -lru = "0.7" +lru = "0.12" num-traits = "0.2" ordered-float = "4.1" serde = {version="1.0", features = ["rc"]} diff --git a/term/src/terminalstate/mod.rs b/term/src/terminalstate/mod.rs index ada148039..6a7f83739 100644 --- a/term/src/terminalstate/mod.rs +++ b/term/src/terminalstate/mod.rs @@ -5,6 +5,7 @@ use super::*; use crate::color::{ColorPalette, RgbColor}; use crate::config::{BidiMode, NewlineCanon}; use log::debug; +use std::num::NonZeroUsize; use num_traits::ToPrimitive; use std::collections::HashMap; use std::io::{BufWriter, Write}; @@ -568,7 +569,7 @@ impl TerminalState { term_program: term_program.to_string(), term_version: term_version.to_string(), writer, - image_cache: lru::LruCache::new(16), + image_cache: lru::LruCache::new(NonZeroUsize::new(16).unwrap()), user_vars: HashMap::new(), kitty_img: Default::default(), seqno, diff --git a/umask/Cargo.toml b/umask/Cargo.toml index 933b394d1..279fd9516 100644 --- a/umask/Cargo.toml +++ b/umask/Cargo.toml @@ -3,6 +3,7 @@ name = "umask" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-client/Cargo.toml b/wezterm-client/Cargo.toml index 6e63609c1..a868d1fa9 100644 --- a/wezterm-client/Cargo.toml +++ b/wezterm-client/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm-client" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,7 +18,7 @@ futures = "0.3" lazy_static = "1.4" log = "0.4" libc = "0.2" -lru = "0.7" +lru = "0.12" metrics = { version="0.17", features=["std"]} mux = { path = "../mux" } openssl = "0.10.57" diff --git a/wezterm-client/src/pane/renderable.rs b/wezterm-client/src/pane/renderable.rs index 60a522cec..0bb947129 100644 --- a/wezterm-client/src/pane/renderable.rs +++ b/wezterm-client/src/pane/renderable.rs @@ -1,4 +1,5 @@ use crate::domain::ClientInner; +use std::num::NonZeroUsize; use crate::pane::clientpane::ClientPane; use anyhow::anyhow; use codec::*; @@ -104,7 +105,7 @@ impl RenderableInner { poll_interval: BASE_POLL_INTERVAL, cursor_position: StableCursorPosition::default(), dimensions, - lines: LruCache::new(configuration().scrollback_lines), + lines: LruCache::new(NonZeroUsize::new(configuration().scrollback_lines.max(128)).unwrap()), title: title.to_string(), working_dir: None, fetch_limiter, @@ -634,7 +635,7 @@ impl RenderableInner { } lazy_static::lazy_static! { - static ref IMAGE_LRU: Mutex>> = Mutex::new(LruCache::new(128)); + static ref IMAGE_LRU: Mutex>> = Mutex::new(LruCache::new(NonZeroUsize::new(128).unwrap())); } pub(crate) async fn hydrate_lines( diff --git a/wezterm-font/Cargo.toml b/wezterm-font/Cargo.toml index 1ce78250a..2a18e0a08 100644 --- a/wezterm-font/Cargo.toml +++ b/wezterm-font/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm-font" version = "0.1.0" authors = ["Wez Furlong "] edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-gui-subcommands/Cargo.toml b/wezterm-gui-subcommands/Cargo.toml index e64cfe085..309d11e8f 100644 --- a/wezterm-gui-subcommands/Cargo.toml +++ b/wezterm-gui-subcommands/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm-gui-subcommands" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-gui/Cargo.toml b/wezterm-gui/Cargo.toml index b437ef18c..e0dd3e0ce 100644 --- a/wezterm-gui/Cargo.toml +++ b/wezterm-gui/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Wez Furlong "] edition = "2018" build = "build.rs" resolver = "2" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-mux-server-impl/Cargo.toml b/wezterm-mux-server-impl/Cargo.toml index 146c38e36..225c8d472 100644 --- a/wezterm-mux-server-impl/Cargo.toml +++ b/wezterm-mux-server-impl/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm-mux-server-impl" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-mux-server/Cargo.toml b/wezterm-mux-server/Cargo.toml index 4070049f1..4befffab9 100644 --- a/wezterm-mux-server/Cargo.toml +++ b/wezterm-mux-server/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" resolver = "2" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-open-url/Cargo.toml b/wezterm-open-url/Cargo.toml index aa792764e..eec4fb2a8 100644 --- a/wezterm-open-url/Cargo.toml +++ b/wezterm-open-url/Cargo.toml @@ -2,6 +2,7 @@ name = "wezterm-open-url" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-toast-notification/Cargo.toml b/wezterm-toast-notification/Cargo.toml index f6172885e..21f40e9b1 100644 --- a/wezterm-toast-notification/Cargo.toml +++ b/wezterm-toast-notification/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" build = "build.rs" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm-version/Cargo.toml b/wezterm-version/Cargo.toml index b588aede7..83d686a7a 100644 --- a/wezterm-version/Cargo.toml +++ b/wezterm-version/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm-version" version = "0.1.0" edition = "2021" build = "build.rs" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wezterm/Cargo.toml b/wezterm/Cargo.toml index 64e6224bd..a64bbf9e4 100644 --- a/wezterm/Cargo.toml +++ b/wezterm/Cargo.toml @@ -3,6 +3,7 @@ name = "wezterm" version = "0.1.0" authors = ["Wez Furlong "] edition = "2018" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html