mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +08:00
d7febd4f3e
lazy_static has better ergonomics at the call/access sites (it returns a reference to the type directly, whereas with once_cell we get a static Lazy<T> that we must dereference instead) but the once_cell api is slated for integration into the standard library [0] and has been the "preferred" way to declare static global variables w/ deferred initialization. It's also less opaque and easier to comprehend how it works, I guess? (Both `once_cell` and `lazy_static` are already in our dependency tree, so this should have no detrimental effect on build times. It actually negligibly *improves* build times by not using macros, reducing the amount of expansion the compiler has to do by a miniscule amount.) [0]: https://github.com/rust-lang/rust/issues/74465
56 lines
1.8 KiB
TOML
56 lines
1.8 KiB
TOML
[package]
|
|
name = "fish-rust"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
|
|
[dependencies]
|
|
widestring-suffix = { path = "./widestring-suffix/" }
|
|
|
|
autocxx = "0.23.1"
|
|
cxx = "1.0"
|
|
errno = "0.2.8"
|
|
inventory = { version = "0.3.3", optional = true}
|
|
lazy_static = "1.4.0"
|
|
libc = "0.2.137"
|
|
nix = { version = "0.25.0", default-features = false, features = [] }
|
|
num-traits = "0.2.15"
|
|
once_cell = "1.17.0"
|
|
unixstring = "0.2.7"
|
|
widestring = "1.0.2"
|
|
|
|
[build-dependencies]
|
|
autocxx-build = "0.23.1"
|
|
cxx-build = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
|
|
cxx-gen = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
|
|
miette = { version = "5", features = ["fancy"] }
|
|
|
|
[lib]
|
|
crate-type=["staticlib"]
|
|
|
|
[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"]
|
|
|
|
[patch.crates-io]
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
cxx = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
|
|
cxx-gen = { git = "https://github.com/ridiculousfish/cxx", branch = "fish" }
|
|
autocxx = { git = "https://github.com/ridiculousfish/autocxx", branch = "fish" }
|
|
autocxx-build = { git = "https://github.com/ridiculousfish/autocxx", branch = "fish" }
|
|
autocxx-bindgen = { git = "https://github.com/ridiculousfish/autocxx-bindgen", branch = "fish" }
|
|
|
|
[patch.'https://github.com/ridiculousfish/cxx']
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
|
|
[patch.'https://github.com/ridiculousfish/autocxx']
|
|
cc = { git = "https://github.com/mqudsi/cc-rs", branch = "fish" }
|
|
|
|
#cxx = { path = "../../cxx" }
|
|
#cxx-gen = { path="../../cxx/gen/lib" }
|
|
#autocxx = { path = "../../autocxx" }
|
|
#autocxx-build = { path = "../../autocxx/gen/build" }
|
|
#autocxx-bindgen = { path = "../../autocxx-bindgen" }
|