[workspace]
members = ["."]
exclude = ["fuzz"]
[package]
name = "tsrun"
version = "0.1.19"
edition = "2024"
description = "A TypeScript interpreter designed for embedding in applications"
license = "MIT"
repository = "https://github.com/DmitryBochkarev/tsrun"
keywords = ["typescript", "javascript", "interpreter", "embedding"]
categories = ["parser-implementations"]
[lib]
crate-type = ["rlib", "cdylib", "staticlib"]
[[bin]]
name = "tsrun"
path = "src/bin/tsrun.rs"
required-features = ["std"]
[[example]]
name = "profile_parser"
required-features = ["dev-tools"]
[[example]]
name = "test262-runner"
required-features = ["dev-tools"]
[features]
default = ["std"]
std = ["regex", "console", "serde/std", "serde_json/std", "rustc-hash/std"]
dev-tools = ["std"]
regex = ["dep:fancy-regex"]
console = []
c-api = []
wasm = ["c-api", "console", "dep:dlmalloc"]
[dependencies]
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
indexmap = { version = "2.0", default-features = false, features = ["serde"] }
fancy-regex = { version = "0.17", optional = true }
rustc-hash = { version = "2.1", default-features = false }
hashbrown = { version = "0.15", default-features = false, features = ["default-hasher"] }
libm = "0.2"
[target.'cfg(target_arch = "wasm32")'.dependencies]
dlmalloc = { version = "0.2", optional = true, features = ["global"] }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
[[bench]]
name = "parser"
harness = false
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
indexing_slicing = "deny"
panic = "deny"
unreachable = "deny"
todo = "deny"
unimplemented = "deny"
string_slice = "deny"
[profile.release]
lto = true
codegen-units = 1
opt-level = "z"
strip = true
panic = "abort"
[profile.profiling]
inherits = "release"
debug = true
strip = false
[build-dependencies]
trampoline-parser = { version = "0.1", path = "../trampoline-parser/trampoline-parser" }