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