[package]
name = "brush-builtins"
description = "Builtins for a POSIX/bash shell (used by brush-shell)"
version = "0.2.0"
categories.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true

[lib]
bench = false

[features]
default = [
    'builtin.alias',
    'builtin.bg',
    'builtin.bind',
    'builtin.break',
    'builtin.builtin',
    'builtin.caller',
    'builtin.cd',
    'builtin.colon',
    'builtin.command',
    'builtin.compgen',
    'builtin.compopt',
    'builtin.complete',
    'builtin.continue',
    'builtin.declare',
    'builtin.dirs',
    'builtin.dot',
    'builtin.echo',
    'builtin.enable',
    'builtin.eval',
    'builtin.exec',
    'builtin.exit',
    'builtin.export',
    'builtin.false',
    'builtin.fc',
    'builtin.fg',
    'builtin.getopts',
    'builtin.hash',
    'builtin.help',
    'builtin.history',
    'builtin.jobs',
    'builtin.kill',
    'builtin.let',
    'builtin.mapfile',
    'builtin.popd',
    'builtin.printf',
    'builtin.pushd',
    'builtin.pwd',
    'builtin.read',
    'builtin.return',
    'builtin.set',
    'builtin.shift',
    'builtin.shopt',
    'builtin.suspend',
    'builtin.test',
    'builtin.times',
    'builtin.trap',
    'builtin.true',
    'builtin.type',
    'builtin.ulimit',
    'builtin.umask',
    'builtin.unalias',
    'builtin.unset',
    'builtin.wait',
]

'builtin.alias' = []
'builtin.bg' = []
'builtin.bind' = []
'builtin.break' = []
'builtin.builtin' = []
'builtin.caller' = []
'builtin.cd' = []
'builtin.colon' = []
'builtin.command' = []
'builtin.compgen' = []
'builtin.complete' = []
'builtin.compopt' = []
'builtin.continue' = []
'builtin.declare' = []
'builtin.dirs' = []
'builtin.dot' = []
'builtin.echo' = []
'builtin.enable' = []
'builtin.eval' = []
'builtin.exec' = []
'builtin.exit' = []
'builtin.export' = []
'builtin.false' = []
'builtin.fc' = []
'builtin.fg' = []
'builtin.getopts' = []
'builtin.hash' = []
'builtin.help' = []
'builtin.history' = []
'builtin.jobs' = []
'builtin.kill' = []
'builtin.let' = []
'builtin.mapfile' = []
'builtin.popd' = []
'builtin.printf' = []
'builtin.pushd' = []
'builtin.pwd' = []
'builtin.read' = []
'builtin.return' = []
'builtin.set' = []
'builtin.shift' = []
'builtin.shopt' = []
'builtin.suspend' = []
'builtin.test' = []
'builtin.times' = []
'builtin.trap' = []
'builtin.true' = []
'builtin.type' = []
'builtin.ulimit' = []
'builtin.umask' = []
'builtin.unalias' = []
'builtin.unset' = []
'builtin.wait' = []

[lints]
workspace = true

[dependencies]
brush-core = { version = "^0.5.0", path = "../brush-core" }
brush-parser = { version = "^0.4.0", path = "../brush-parser" }
cfg-if = "1.0.4"
chrono = "0.4.44"
clap = { version = "4.6.0", features = ["derive", "wrap_help"] }
fancy-regex = "0.17.0"
futures = "0.3.32"
itertools = "0.14.0"
strum = "0.28.0"
strum_macros = "0.28.0"
thiserror = "2.0.18"
tracing = "0.1.44"

[target.'cfg(target_family = "wasm")'.dependencies]
tokio = { version = "1.52.1", features = ["io-util", "macros", "rt"] }

[target.'cfg(any(unix, windows))'.dependencies]
tokio = { version = "1.50.0", features = [
    "io-util",
    "macros",
    "process",
    "rt",
    "rt-multi-thread",
    "signal",
    "sync",
] }
uucore = { version = "0.8.0", default-features = false, features = ["format"] }

[target.'cfg(unix)'.dependencies]
nix = { version = "0.31.2", features = [
    "fs",
    "process",
    "resource",
    "signal",
    "term",
    "user",
] }
rlimit = "0.11.0"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
procfs = "0.18.0"

[dev-dependencies]
anyhow = "1.0.102"
pretty_assertions = { version = "1.4.1", features = ["unstable"] }
