[package]
name = "sus_compiler"
description = "Compiler for the SUS Hardware Design Language"
version = "0.2.1"
authors = ["Lennart Van Hirtum <lennart.vanhirtum@gmail.com>"]
edition = "2021"
license = "GPL-3.0-or-later"
repository = "https://github.com/pc2/sus-compiler"
homepage = "https://github.com/pc2/sus-compiler"
readme = "README.md"
keywords = ["sus", "fpga", "vlsi", "hdl", "verilog"]
categories = ["compilers", "text-processing"]
rust-version = "1.80"

include = ["/src", "/std/*", "/README.md", "/LICENSE", "/CHANGELOG.md", "/build.rs", "/rustfmt.toml"]

[workspace]
members = [
    "sus-proc-macro",
    "tree-sitter-sus"
]

[dependencies]
# console = "0.15.7" # for terminal colors
# chumsky = "0.9.2"
ariadne = "0.5.1" # for nice errors
num = "0.4"
clap = { version = "4.5.21", features = ["derive", "wrap_help"] }
bitvector = "0.1.5"

# Tree sitter
tree-sitter = "~0.24.7"
tree-sitter-sus = {version = "~0.2.0", path = "./tree-sitter-sus"}

sus-proc-macro = {version = "~0.2.0", path = "./sus-proc-macro"}

# calyx-ir = {version = "0.6.1", optional = true}
# calyx-opt = {version = "0.6.1", optional = true}
# calyx-backend = {version = "0.6.1", optional = true}

# moore-circt = {version = "0.14.0", optional = true, path = "/home/lennart/Desktop/moore/src/circt"}
# moore-circt-sys = {version = "0.14.0", optional = true, path = "/home/lennart/Desktop/moore/src/circt-sys"}
# moore-circt = {version = "0.14.0", optional = true}
# moore-circt-sys = {version = "0.14.0", optional = true}

#lsp
lsp-server = {version = "0.7.1", optional = true}
lsp-types = {version = "0.94.0", optional = true}
serde_json = {version = "1.0.97", optional = true}
serde = {version = "1.0.156", optional = true}

[build-dependencies]
dirs-next = "2.0.0"

[features]
default = ["lsp"]

lsp = ["lsp-server", "lsp-types", "serde_json", "serde"]
# codegen = ["calyx-ir", "calyx-opt", "calyx-backend"]
# codegen = ["moore-circt-sys", "moore-circt"]

[profile.release]
debug = true

[profile.smol]
debug = false
strip = true
opt-level = 'z'
codegen-units = 1
lto = true
panic = 'abort'
inherits = "release"