-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
97 lines (77 loc) · 2.42 KB
/
Cargo.toml
File metadata and controls
97 lines (77 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[workspace]
members = ["."]
exclude = ["fuzz"]
[package]
name = "tsrun"
version = "0.1.23"
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"]
# Full std support (current behavior)
std = ["regex", "console", "serde/std", "serde_json/std", "rustc-hash/std"]
# Development tools (profilers, test runners) - not installed by default
dev-tools = ["std"]
# Regex support (requires std due to fancy-regex)
regex = ["dep:fancy-regex"]
# Console builtin (now works with any ConsoleProvider)
console = []
# C API for embedding (no_std compatible)
c-api = []
# WASM exports for all runtimes (browser, wazero, wasmer, wasmtime)
# Uses C-style FFI, host provides platform functions via imports
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"
# WASM dependencies (optional)
[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.3" }
quote = "1.0"