mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-20 16:11:14 -03:00
Update our MSRV to Rust 1.85. Includes fixes for lints which were previously suppressed due to them relying on features added after Rust 1.70. Rust 1.85 prints a warning when using `#[cfg(target_os = "cygwin")]`, so we work around the one instance where this is a problem for now. This workaround can be reverted when we update to Rust 1.86 or newer. Certain old versions of macOS are no longer supported by Rust starting with Rust 1.74, so this commit raises our macOS version requirement to 10.12. https://blog.rust-lang.org/2023/09/25/Increasing-Apple-Version-Requirements/ https://github.com/fish-shell/fish-shell/pull/11961#discussion_r2442415411 Closes #11961
175 lines
5.3 KiB
TOML
175 lines
5.3 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/*"]
|
|
|
|
[workspace.package]
|
|
# To build revisions that use Corrosion (those before 2024-01), use CMake 3.19, Rustc 1.78 and Rustup 1.27.
|
|
rust-version = "1.85"
|
|
edition = "2021"
|
|
repository = "https://github.com/fish-shell/fish-shell"
|
|
|
|
[workspace.dependencies]
|
|
bitflags = "2.5.0"
|
|
cc = "1.0.94"
|
|
cfg-if = "1.0.3"
|
|
errno = "0.3.0"
|
|
fish-build-helper = { path = "crates/build-helper" }
|
|
fish-build-man-pages = { path = "crates/build-man-pages" }
|
|
fish-gettext-extraction = { path = "crates/gettext-extraction" }
|
|
fish-gettext-maps = { path = "crates/gettext-maps" }
|
|
fish-gettext-mo-file-parser = { path = "crates/gettext-mo-file-parser" }
|
|
fish-printf = { path = "crates/printf", features = ["widestring"] }
|
|
libc = "0.2.177"
|
|
# lru pulls in hashbrown by default, which uses a faster (though less DoS resistant) hashing algo.
|
|
# disabling default features uses the stdlib instead, but it doubles the time to rewrite the history
|
|
# files as of 22 April 2024.
|
|
lru = "0.13.0"
|
|
nix = { version = "0.30.1", default-features = false, features = [
|
|
"event",
|
|
"inotify",
|
|
"resource",
|
|
"fs",
|
|
] }
|
|
num-traits = "0.2.19"
|
|
once_cell = "1.19.0"
|
|
pcre2 = { git = "https://github.com/fish-shell/rust-pcre2", tag = "0.2.9-utf32", default-features = false, features = [
|
|
"utf32",
|
|
] }
|
|
phf = { version = "0.12", default-features = false }
|
|
phf_codegen = { version = "0.12" }
|
|
portable-atomic = { version = "1", default-features = false, features = [
|
|
"fallback",
|
|
] }
|
|
proc-macro2 = "1.0"
|
|
# Don't use the "getrandom" feature as it requires "getentropy" which was not
|
|
# available on macOS < 10.12. We can enable "getrandom" when we raise the
|
|
# minimum supported version to 10.12.
|
|
rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
|
|
rsconf = "0.2.2"
|
|
rust-embed = { version = "8.7.2", features = ["deterministic-timestamps"] }
|
|
serial_test = { version = "3", default-features = false }
|
|
# We need 0.9.0 specifically for some crash fixes.
|
|
terminfo = "0.9.0"
|
|
widestring = "1.2.0"
|
|
unicode-segmentation = "1.12.0"
|
|
unicode-width = "0.2.0"
|
|
unix_path = "1.0.1"
|
|
|
|
[profile.release]
|
|
overflow-checks = true
|
|
lto = true
|
|
|
|
[profile.release-with-debug]
|
|
inherits = "release"
|
|
debug = true
|
|
|
|
[package]
|
|
name = "fish"
|
|
version = "4.1.0-snapshot"
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
default-run = "fish"
|
|
# see doc_src/license.rst for details
|
|
# don't forget to update COPYING and debian/copyright too
|
|
license = "GPL-2.0-only AND LGPL-2.0-or-later AND MIT AND PSF-2.0"
|
|
homepage = "https://fishshell.com"
|
|
readme = "README.rst"
|
|
|
|
[dependencies]
|
|
bitflags.workspace = true
|
|
cfg-if.workspace = true
|
|
errno.workspace = true
|
|
fish-build-helper.workspace = true
|
|
fish-build-man-pages = { workspace = true, optional = true }
|
|
fish-gettext-extraction = { workspace = true, optional = true }
|
|
fish-gettext-maps = { workspace = true, optional = true }
|
|
fish-printf.workspace = true
|
|
libc.workspace = true
|
|
lru.workspace = true
|
|
macro_rules_attribute = "0.2.2"
|
|
nix.workspace = true
|
|
num-traits.workspace = true
|
|
once_cell.workspace = true
|
|
pcre2.workspace = true
|
|
phf = { workspace = true, optional = true }
|
|
rand.workspace = true
|
|
terminfo.workspace = true
|
|
widestring.workspace = true
|
|
|
|
[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
|
|
portable-atomic.workspace = true
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
rust-embed = { workspace = true, optional = true, features = [
|
|
"deterministic-timestamps",
|
|
"debug-embed",
|
|
] }
|
|
[target.'cfg(not(windows))'.dependencies]
|
|
rust-embed = { workspace = true, optional = true, features = [
|
|
"deterministic-timestamps",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
serial_test.workspace = true
|
|
|
|
[build-dependencies]
|
|
cc.workspace = true
|
|
fish-build-helper.workspace = true
|
|
fish-gettext-mo-file-parser.workspace = true
|
|
phf_codegen = { workspace = true, optional = true }
|
|
rsconf.workspace = true
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
unix_path.workspace = true
|
|
|
|
[lib]
|
|
crate-type = ["rlib"]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "fish"
|
|
path = "src/bin/fish.rs"
|
|
|
|
[[bin]]
|
|
name = "fish_indent"
|
|
path = "src/bin/fish_indent.rs"
|
|
|
|
[[bin]]
|
|
name = "fish_key_reader"
|
|
path = "src/bin/fish_key_reader.rs"
|
|
|
|
[features]
|
|
default = ["embed-data", "localize-messages"]
|
|
benchmark = []
|
|
embed-data = ["dep:rust-embed", "dep:fish-build-man-pages"]
|
|
# Enable gettext localization at runtime. Requires the `msgfmt` tool to generate catalog data at
|
|
# build time.
|
|
localize-messages = ["dep:phf", "dep:fish-gettext-maps"]
|
|
# This feature is used to enable extracting messages from the source code for localization.
|
|
# It only needs to be enabled if updating these messages (and the corresponding PO files) is
|
|
# desired. This happens when running tests via `build_tools/check.sh` and when calling
|
|
# `build_tools/update_translations.fish`, so there should not be a need to enable it manually.
|
|
gettext-extract = ["dep:fish-gettext-extraction"]
|
|
|
|
# The following features are auto-detected by the build-script and should not be enabled manually.
|
|
asan = []
|
|
tsan = []
|
|
|
|
[workspace.lints]
|
|
rust.non_camel_case_types = "allow"
|
|
rust.non_upper_case_globals = "allow"
|
|
rust.unknown_lints = "allow"
|
|
rust.unstable_name_collisions = "allow"
|
|
clippy.manual_range_contains = "allow"
|
|
clippy.needless_return = "allow"
|
|
clippy.needless_lifetimes = "allow"
|
|
|
|
# We do not want to use the e?print(ln)?! macros.
|
|
# These lints flag their use.
|
|
# In the future, they might change to flag other methods of printing.
|
|
clippy.print_stdout = "deny"
|
|
clippy.print_stderr = "deny"
|
|
|
|
[lints]
|
|
workspace = true
|