swc 6.0.0

Speedy web compiler
Documentation


[package]
authors       = ["강동윤 <kdy1997.dev@gmail.com>"]
description   = "Speedy web compiler"
documentation = "https://rustdoc.swc.rs/swc/"
edition       = "2021"
include       = ["Cargo.toml", "src/**/*.rs"]
license       = "Apache-2.0"
name          = "swc"
repository    = "https://github.com/swc-project/swc.git"
version       = "6.0.0"

[lib]
bench = false
name  = "swc"

[features]
# TODO: This may need reorganization with swc_core - swc_core allows to optionally enable
# each features (minifier, transforms..) but swc includes all of them.
concurrent = [
  "swc_ecma_transforms/concurrent",
  "swc_common/concurrent",
  "swc_ecma_minifier/concurrent",
]

debug = ["swc_ecma_visit/debug", "swc_ecma_minifier/debug"]
default = ["es3"]
es3 = []
node = ["napi", "napi-derive", "swc_compiler_base/node"]
plugin = [
  "swc_plugin_runner/ecma",
  "swc_plugin_runner/rkyv-impl",
  "swc_plugin_proxy/plugin-rt",
  "tokio",
]
plugin_transform_schema_v1 = [
  "swc_common/plugin_transform_schema_v1",
  "swc_plugin_runner/plugin_transform_schema_v1",
]
plugin_transform_schema_vtest = [
  "swc_common/plugin_transform_schema_vtest",
  "swc_plugin_runner/plugin_transform_schema_vtest",
]

plugin_transform_host_js = ["swc_plugin_runner/plugin_transform_host_js"]
plugin_transform_host_native = [
  "swc_plugin_runner/plugin_transform_host_native",
]
# Do not inject tokio runtime while running plugin transforms
manual-tokio-runtmie = ["manual-tokio-runtime"]
manual-tokio-runtime = []

[dependencies]
anyhow       = { workspace = true }
base64       = { workspace = true }
dashmap      = { workspace = true }
either       = { workspace = true }
indexmap     = { workspace = true, features = ["serde"] }
jsonc-parser = { workspace = true, features = ["serde"] }
lru          = { workspace = true }
once_cell    = { workspace = true }
parking_lot  = { workspace = true }
pathdiff     = { workspace = true }
regex        = { workspace = true }
rustc-hash   = { workspace = true }
serde        = { workspace = true, features = ["derive"] }
serde_json   = { workspace = true }
sourcemap    = { workspace = true }
tracing      = { workspace = true }
url          = { workspace = true }

swc_atoms = { version = "2.0.0", path = "../swc_atoms" }
swc_cached = { version = "1.0.0", path = "../swc_cached" }
swc_common = { version = "4.0.1", path = "../swc_common", features = [
  "ahash",
  "sourcemap",
  "parking_lot",
] }
swc_compiler_base = { version = "5.0.0", path = "../swc_compiler_base" }
swc_config = { version = "1.0.0", path = "../swc_config" }
swc_ecma_ast = { version = "4.0.1", path = "../swc_ecma_ast" }
swc_ecma_codegen = { version = "4.0.2", path = "../swc_ecma_codegen" }
swc_ecma_ext_transforms = { version = "5.0.0", path = "../swc_ecma_ext_transforms" }
swc_ecma_lints = { version = "5.0.0", path = "../swc_ecma_lints" }
swc_ecma_loader = { version = "4.0.0", path = "../swc_ecma_loader", features = [
  "cache",
  "node",
  "tsc",
] }
swc_ecma_minifier = { version = "5.0.0", path = "../swc_ecma_minifier" }
swc_ecma_parser = { version = "5.0.0", path = "../swc_ecma_parser" }
swc_ecma_preset_env = { version = "6.0.0", path = "../swc_ecma_preset_env" }
swc_ecma_transforms = { version = "6.0.0", path = "../swc_ecma_transforms", features = [
  "compat",
  "module",
  "optimization",
  "proposal",
  "react",
  "typescript",
] }
swc_ecma_transforms_base = { version = "5.0.1", path = "../swc_ecma_transforms_base" }
swc_ecma_transforms_compat = { version = "6.0.0", path = "../swc_ecma_transforms_compat" }
swc_ecma_transforms_optimization = { version = "5.0.0", path = "../swc_ecma_transforms_optimization" }
swc_ecma_utils = { version = "5.0.0", path = "../swc_ecma_utils" }
swc_ecma_visit = { version = "4.0.0", path = "../swc_ecma_visit" }
swc_error_reporters = { version = "5.0.0", path = "../swc_error_reporters" }
swc_node_comments = { version = "4.0.0", path = "../swc_node_comments" }
swc_plugin_proxy = { version = "4.0.0", path = "../swc_plugin_proxy", optional = true }
swc_plugin_runner = { version = "4.0.0", path = "../swc_plugin_runner", optional = true, default-features = false }
swc_timer = { version = "1.0.0", path = "../swc_timer" }
swc_transform_common = { version = "1.0.0", path = "../swc_transform_common" }
swc_typescript = { version = "4.0.0", path = "../swc_typescript" }
swc_visit = { version = "2.0.0", path = "../swc_visit" }

  [dependencies.tokio]
  features  = ["rt", "rt-multi-thread"]
  optional  = true
  workspace = true


  [dependencies.napi]
  features  = ["napi3"]
  optional  = true
  workspace = true

  [dependencies.napi-derive]
  features  = ["type-def"]
  optional  = true
  workspace = true

[dev-dependencies]
ansi_term = { workspace = true }
criterion = { workspace = true }
rayon     = { workspace = true }
walkdir   = { workspace = true }

codspeed-criterion-compat = { workspace = true }
swc_ecma_ast = { version = "4.0.1", path = "../swc_ecma_ast", features = [
  "serde-impl",
] }
swc_ecma_lints = { version = "5.0.0", path = "../swc_ecma_lints", features = [
  "non_critical_lints",
] }
swc_ecma_testing = { version = "4.0.0", path = "../swc_ecma_testing" }
swc_malloc = { version = "1.0.0", path = "../swc_malloc" }
testing = { version = "4.0.0", path = "../testing" }

[[example]]
name = "transform"

[[bench]]
harness = false
name    = "bugs"

[[bench]]
harness = false
name    = "minify"


[[bench]]
harness = false
name    = "oxc"


[[bench]]
harness = false
name    = "typescript"