[package]
name = "kcl-lib"
description = "KittyCAD Language implementation and tools"
version = "0.1.58"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"
rust-version = "1.73"
authors = ["Jess Frazelle", "Adam Chalmers", "KittyCAD, Inc"]
keywords = ["kcl", "KittyCAD", "CAD"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = { version = "1.0.86", features = ["backtrace"] }
async-recursion = "1.1.1"
async-trait = "0.1.80"
base64 = "0.22.1"
chrono = "0.4.38"
clap = { version = "4.5.4", default-features = false, optional = true }
dashmap = "5.5.3"
databake = { version = "0.1.7", features = ["derive"] }
derive-docs = { version = "0.1.18",  path = "../derive-docs" }
form_urlencoded = "1.2.1"
futures = { version = "0.3.30" }
git_rev = "0.1.0"
gltf-json = "1.4.1"
kittycad = { workspace = true, features = ["clap"] }
kittycad-execution-plan-macros = { workspace = true }
kittycad-execution-plan-traits = { workspace = true }
lazy_static = "1.4.0"
mime_guess = "2.0.4"
parse-display = "0.9.0"
reqwest = { version = "0.11.26", default-features = false, features = ["stream", "rustls-tls"] }
ropey = "1.6.1"
schemars = { version = "0.8.17", features = ["impl_json_schema", "url", "uuid1"] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.116"
sha2 = "0.10.8"
thiserror = "1.0.61"
toml = "0.8.13"
# TODO: change this to a cargo release once 8.1.1 comes out
ts-rs = { git = "https://github.com/Aleph-Alpha/ts-rs", features = ["uuid-impl", "url-impl", "chrono-impl", "no-serde-warnings", "serde-json-impl"] }
url = { version = "2.5.0", features = ["serde"] }
uuid = { version = "1.8.0", features = ["v4", "js", "serde"] }
validator = { version = "0.18.1", features = ["derive"] }
winnow = "0.5.40"
zip = { version = "2.0.0", default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = { version = "0.3.69" }
tokio = { version = "1.37.0", features = ["sync", "time"] }
tower-lsp = { version = "0.20.0", default-features = false, features = ["runtime-agnostic"] }
wasm-bindgen = "0.2.91"
wasm-bindgen-futures = "0.4.42"
web-sys = { version = "0.3.69", features = ["console"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
approx = "0.5"
bson = { version = "2.10.0", features = ["uuid-1", "chrono"] }
tokio = { version = "1.37.0", features = ["full"] }
tokio-tungstenite = { version = "0.21.0", features = ["rustls-tls-native-roots"] }
tower-lsp = { version = "0.20.0", features = ["proposed"] }

[features]
default = ["cli", "engine"]
cli = ["dep:clap"]
engine = []

[profile.release]
panic = "abort"
debug = true

[profile.bench]
debug = true # Flamegraphs of benchmarks require accurate debug symbols

[dev-dependencies]
base64 = "0.22.1"
convert_case = "0.6.0"
criterion = "0.5.1"
expectorate = "1.1.0"
iai = "0.1"
image = "0.24.9"
insta = { version = "1.38.0", features = ["json"] }
itertools = "0.13.0"
pretty_assertions = "1.4.0"
tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros", "time"] }
twenty-twenty = "0.7.0"

[[bench]]
name = "compiler_benchmark_criterion"
harness = false

[[bench]]
name = "compiler_benchmark_iai"
harness = false
