[package]
name = "slang"
version = "0.1.2"
edition = "2021"

[workspace]
members = ["libs/*"]

[workspace.dependencies]
thiserror = "2"
rust_decimal = "1"
safer-ffi = { version = "0.1" }  # Safely share structs in memory between C# and Rust
lsp-types = { version = "0.97" } # Allows for LSP style reporting to the frontend
crc32fast = "1.5"                # This is for `HASH(..)` calls to be optimized away

[features]
headers = ["safer-ffi/headers"]

[profile.release]
strip = true

[[bin]]
name = "slang"
path = "src/main.rs"

[[bin]]
name = "generate-headers"
path = "src/bin/generate_headers.rs"
required-features = ["headers"]

[lib]
name = "slang"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[dependencies]
clap = { version = "^4.5", features = ["derive"] }
lsp-types = { workspace = true }
thiserror = { workspace = true }
rust_decimal = { workspace = true }
tokenizer = { path = "libs/tokenizer" }
parser = { path = "libs/parser" }
compiler = { path = "libs/compiler" }
helpers = { path = "libs/helpers" }
safer-ffi = { workspace = true }

[dev-dependencies]
anyhow = { version = "^1.0", features = ["backtrace"] }
