mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
e7f8fb04cc
In CMake this used a `version` file in the CARGO_MANIFEST_DIR, but relying on that is problematic due to change-detection, as if we add `cargo-rerun-if-changed:version`, cargo would rerun every time if the file does not exist, since cargo would expect the file to be generated by the build-script. We could generate it, but that relies on the output of `git describe`, whose dependencies we can only limit to anything in the `.git`-folder, again causing unnecessary build-script runs. Instead, this reads the `FISH_BUILD_VERSION`-env-variable at compile time instead of the `version`-file, and falls back to calling git-describe through the `git_version`-proc-macro. We thus do not need to deal with extraneous build-script running.
84 lines
2.7 KiB
TOML
84 lines
2.7 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"fish-rust/widestring-suffix",
|
|
]
|
|
|
|
[workspace.package]
|
|
rust-version = "1.67"
|
|
edition = "2021"
|
|
|
|
# TODO: Move fish-rust to src, make it the root package of this workspace
|
|
|
|
[patch.crates-io]
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
cxx = { git = "https://github.com/fish-shell/cxx", branch = "fish" }
|
|
cxx-gen = { git = "https://github.com/fish-shell/cxx", branch = "fish" }
|
|
autocxx = { git = "https://github.com/fish-shell/autocxx", branch = "fish" }
|
|
autocxx-build = { git = "https://github.com/fish-shell/autocxx", branch = "fish" }
|
|
autocxx-bindgen = { git = "https://github.com/fish-shell/autocxx-bindgen", branch = "fish" }
|
|
|
|
[patch.'https://github.com/fish-shell/cxx']
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
|
|
[patch.'https://github.com/fish-shell/autocxx']
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
|
|
|
|
[profile.release]
|
|
overflow-checks = true
|
|
|
|
[package]
|
|
name = "fish-rust"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
build = "fish-rust/build.rs"
|
|
|
|
[dependencies]
|
|
widestring-suffix = { path = "fish-rust/widestring-suffix/" }
|
|
pcre2 = { git = "https://github.com/fish-shell/rust-pcre2", branch = "master", default-features = false, features = ["utf32"] }
|
|
fast-float = { git = "https://github.com/fish-shell/fast-float-rust", branch="fish" }
|
|
hexponent = { git = "https://github.com/fish-shell/hexponent", branch="fish" }
|
|
printf-compat = { git = "https://github.com/fish-shell/printf-compat.git", branch="fish" }
|
|
|
|
autocxx = "0.23.1"
|
|
bitflags = "1.3.2"
|
|
cxx = "1.0"
|
|
errno = "0.2.8"
|
|
inventory = { version = "0.3.3", optional = true}
|
|
lazy_static = "1.4.0"
|
|
libc = "0.2.137"
|
|
lru = "0.10.0"
|
|
moveit = "0.5.1"
|
|
nix = { version = "0.25.0", default-features = false, features = [] }
|
|
num-traits = "0.2.15"
|
|
# to make integer->enum conversion easier
|
|
num-derive = "0.3.3"
|
|
once_cell = "1.17.0"
|
|
rand = { version = "0.8.5", features = ["small_rng"] }
|
|
unixstring = "0.2.7"
|
|
widestring = "1.0.2"
|
|
rand_pcg = "0.3.1"
|
|
git-version = "0.3"
|
|
|
|
[build-dependencies]
|
|
autocxx-build = "0.23.1"
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
cxx-build = { git = "https://github.com/fish-shell/cxx", branch = "fish" }
|
|
cxx-gen = { git = "https://github.com/fish-shell/cxx", branch = "fish" }
|
|
rsconf = { git = "https://github.com/mqudsi/rsconf", branch = "master" }
|
|
|
|
[lib]
|
|
crate-type = ["staticlib"]
|
|
path = "fish-rust/src/lib.rs"
|
|
|
|
[features]
|
|
# The fish-ffi-tests feature causes tests to be built which need to use the FFI.
|
|
# These tests are run by fish_tests().
|
|
default = ["fish-ffi-tests"]
|
|
fish-ffi-tests = ["inventory"]
|
|
|
|
# The following features are auto-detected by the build-script and should not be enabled manually.
|
|
asan = []
|
|
bsd = []
|