[package]
name = "tishlang_eval"
version = "2.8.0"
edition = "2021"
description = "Tish tree-walk interpreter"

license-file = { workspace = true }
repository = { workspace = true }
[features]
default = []
# setTimeout / setInterval / clear* (standalone or with `import { … } from "tish:timers"`).
timers = []
http = [
    "timers",
    "tokio",
    "tiny_http",
    "tishlang_core/regex",
    "dep:tishlang_runtime",
    "tishlang_runtime/http",
    # Interpreter + http means the runtime's `NativeFn` is `Arc<... + Send>`,
    # so the interpreter's `CoreFn` variant must use the same shape.
    "tishlang_core/send-values",
    "tishlang_builtins/send-values",
]
fs = []
process = []
tty = ["dep:tishlang_runtime", "tishlang_runtime/tty"]
regex = ["tishlang_core/regex"]
tokio = ["dep:tokio"]
ws = ["dep:tishlang_runtime", "tishlang_runtime/ws"]

[dependencies]
ahash = "0.8.12"
indexmap = "2"
rand = "0.10.1"
# On-demand native stack growth for deep (non-tail) recursion in the tree-walker,
# mirroring the bytecode VM. Plain dep (stacker is a no-op shim on wasm32, where
# tish_vm already depends on it for the wasi backend).
stacker = "0.1"
tishlang_ast = { path = "../tish_ast", version = ">=0.1" }
tishlang_builtins = { path = "../tish_builtins", version = ">=0.1" }
tishlang_parser = { path = "../tish_parser", version = ">=0.1" }
tishlang_core = { path = "../tish_core", version = ">=0.1" }
tiny_http = { version = "0.12.0", optional = true }
tokio = { version = "1.50.0", features = ["rt-multi-thread", "time", "sync"], optional = true }
tishlang_runtime = { path = "../tish_runtime", version = ">=0.1", optional = true }
