mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
05bad5eda1
Most of it is duplicated, hence untested. Functions like mbrtowc are not exposed by the libc crate, so declare them ourselves. Since we don't know the definition of C macros, add two big hacks to make this work: 1. Replace MB_LEN_MAX and mbstate_t with values (resp types) that should be large enough for any implementation. 2. Detect the definition of MB_CUR_MAX in the build script. This requires more changes for each new libc. We could also use this approach for 1. Additionally, this commit brings a small behavior change to read_unquoted_escape(): we cannot decode surrogate code points like \UDE01 into a Rust char, so use � (\UFFFD, replacement character) instead. Previously, we added such code points to a wcstring; looks like they were ignored when printed.
68 lines
2.4 KiB
TOML
68 lines
2.4 KiB
TOML
[package]
|
|
name = "fish-rust"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.67"
|
|
|
|
[dependencies]
|
|
widestring-suffix = { path = "./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" }
|
|
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}
|
|
libc = "0.2.137"
|
|
lru = "0.10.0"
|
|
nix = { version = "0.25.0", default-features = false, features = [] }
|
|
num-traits = "0.2.15"
|
|
once_cell = "1.17.0"
|
|
rand = { version = "0.8.5", features = ["small_rng"] }
|
|
unixstring = "0.2.7"
|
|
widestring = "1.0.2"
|
|
|
|
[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" }
|
|
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"]
|
|
|
|
# The following features are auto-detected by the build-script and should not be enabled manually.
|
|
bsd = []
|
|
|
|
[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" }
|
|
|
|
#cxx = { path = "../../cxx" }
|
|
#cxx-gen = { path="../../cxx/gen/lib" }
|
|
#autocxx = { path = "../../autocxx" }
|
|
#autocxx-build = { path = "../../autocxx/gen/build" }
|
|
#autocxx-bindgen = { path = "../../autocxx-bindgen" }
|
|
|
|
[profile.release]
|
|
overflow-checks = true
|