nushell/crates/nu-command/Cargo.toml
Stefan Holderbach 46eebc644c
Break up interdependencies of command crates (#9429)
# Description
Make sure that our different crates that contain commands can be
compiled in parallel.
This can under certain circumstances accelerate the compilation with
sufficient multithreading available.

## Details
- Move `help` commands from `nu-cmd-lang` back to `nu-command`
- This also makes sense as the commands are implemented in an
ANSI-terminal specific way
- Make `nu-cmd-lang` only a dev dependency for `nu-command`
- Change context creation helpers for `nu-cmd-extra` and
`nu-cmd-dataframe` to have a consistent api used in
`src/main.rs`:`get_engine_state()`
- `nu-command` now indepedent from `nu-cmd-extra` and `nu-cmd-dataframe`
that are now dependencies of `nu` directly. (change to internal
features)
- Fix tests that previously used `nu-command::create_default_context()`
with replacement functions

## From scratch compilation times:

just debug (dev) build and default features
```
cargo clean --profile dev && cargo build --timings
```

### before

![grafik](https://github.com/nushell/nushell/assets/15833959/e49f1f42-2e53-4a6c-bc23-625b686af1bc)

### after

![grafik](https://github.com/nushell/nushell/assets/15833959/8dec4723-e625-4a86-b91e-e6e808f64726)

# User-Facing Changes
None direct, only change to compilation on multithreaded jobs expected.

# Tests + Formatting
Tests that previously chose to use `nu-command` for their scope will
still use `nu-cmd-lang` + `nu-command` (command list in the granularity
at the time)
2023-06-14 23:12:55 +02:00

131 lines
3.8 KiB
TOML

[package]
authors = ["The Nushell Project Developers"]
description = "Nushell's built-in commands"
edition = "2021"
license = "MIT"
name = "nu-command"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
version = "0.81.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
bench = false
[dependencies]
nu-color-config = { path = "../nu-color-config", version = "0.81.1" }
nu-engine = { path = "../nu-engine", version = "0.81.1" }
nu-glob = { path = "../nu-glob", version = "0.81.1" }
nu-json = { path = "../nu-json", version = "0.81.1" }
nu-parser = { path = "../nu-parser", version = "0.81.1" }
nu-path = { path = "../nu-path", version = "0.81.1" }
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.81.1" }
nu-protocol = { path = "../nu-protocol", version = "0.81.1" }
nu-system = { path = "../nu-system", version = "0.81.1" }
nu-table = { path = "../nu-table", version = "0.81.1" }
nu-term-grid = { path = "../nu-term-grid", version = "0.81.1" }
nu-utils = { path = "../nu-utils", version = "0.81.1" }
nu-ansi-term = "0.47.0"
alphanumeric-sort = "1.5"
ahash = "0.8.3"
atty = "0.2"
base64 = "0.21"
byteorder = "1.4"
bytesize = "1.2"
calamine = "0.19"
chrono = { version = "0.4", features = [ "std", "unstable-locales", ], default-features = false }
chrono-humanize = "0.2"
chrono-tz = "0.8"
crossterm = "0.26"
csv = "1.2"
dialoguer = { default-features = false, features = ["fuzzy-select"], version = "0.10" }
digest = { default-features = false, version = "0.10" }
dtparse = "1.5"
encoding_rs = "0.8"
fancy-regex = "0.11"
filesize = "0.2"
filetime = "0.2"
fs_extra = "1.3"
htmlescape = "0.3"
indexmap = { version = "1.7", features = ["serde-1"] }
indicatif = "0.17"
Inflector = "0.11"
is-root = "0.1"
itertools = "0.10"
log = "0.4"
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] }
md5 = { package = "md-5", version = "0.10" }
miette = { version = "5.9", features = ["fancy-no-backtrace"] }
mime = "0.3"
mime_guess = "2.0"
notify = "4.0"
num = { version = "0.4", optional = true }
num-format = { version = "0.4" }
num-traits = "0.2"
once_cell = "1.17"
open = "4.0"
os_pipe = "1.1"
pathdiff = "0.2"
percent-encoding = "2.2"
powierza-coefficient = "1.0"
print-positions = "0.6"
quick-xml = "0.28"
rand = "0.8"
rayon = "1.7"
regex = "1.7"
roxmltree = "0.18"
rusqlite = { version = "0.29", features = ["bundled"], optional = true }
rust-embed = "6.6"
same-file = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7"
serde_yaml = "0.9"
sha2 = "0.10"
sqlparser = { version = "0.33", features = ["serde"], optional = true }
sysinfo = "0.29"
tabled = { version = "0.12.2", features = ["color"], default-features = false }
terminal_size = "0.2"
titlecase = "2.0"
toml = "0.7"
unicode-segmentation = "1.10"
ureq = { version = "2.6", default-features = false, features = [ "json", "charset", "native-tls", "gzip", ] }
native-tls = "0.2"
url = "2.2"
uuid = { version = "1.3", features = ["v4"] }
wax = { version = "0.5" }
which = { version = "4.4", optional = true }
[target.'cfg(windows)'.dependencies]
winreg = "0.50"
[target.'cfg(unix)'.dependencies]
libc = "0.2"
umask = "2.1"
users = "0.11"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies.trash]
optional = true
version = "3.0"
[target.'cfg(windows)'.dependencies.windows]
features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_SystemServices"]
version = "0.48"
[features]
plugin = ["nu-parser/plugin"]
sqlite = ["rusqlite"]
trash-support = ["trash"]
which-support = ["which"]
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.81.1" }
nu-test-support = { path = "../nu-test-support", version = "0.81.1" }
dirs-next = "2.0"
mockito = "1.0"
quickcheck = "1.0"
quickcheck_macros = "1.0"
rstest = { version = "0.17", default-features = false }