[workspace]
members = [
    "core",
    "macro",
    "quickjs", "quickjs/sys",
    "javascriptcore", "javascriptcore/sys",
    "arkjs", "arkjs/sys",
    "testing/rong_test",
    "testing/rong_test_harness",
    "testing/rong_test_device",
    "examples",
    "rong_rt",
    "modules/rong_timer",
    "modules/rong_http", "modules/rong_encoding", "modules/rong_event",
    "modules/rong_assert", "modules/rong_exception", "modules/rong_storage",
    "modules/rong_abort", "modules/rong_console", "modules/rong_url", "modules/rong_buffer",
    "modules/rong_fs", "modules/rong_stream",
    "modules/rong_compression",
    "modules/rong_command",
    "modules/rong_worker",
    "modules/rong_redis",
    "modules/rong_s3",
    "rong_modules", "rong_cli"
]
exclude = ["testing/harmony/rong_harmony_smoke"]

[workspace.package]
version = "0.3.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/LingXia-Dev/Rong"
homepage = "https://github.com/LingXia-Dev/Rong"
rust-version = "1.90"
readme = "README.md"
keywords = ["javascript", "runtime", "embedding"]
categories = ["api-bindings"]

[workspace.dependencies]
# Internal dependencies
rong = { path = ".", default-features = false   , version = "0.3.0" }
rong_core = { path = "core"   , version = "0.3.0" }
rong_quickjs = { path = "quickjs"   , version = "0.3.0" }
rong_quickjs_sys = { path = "quickjs/sys"   , version = "0.3.0" }
rong_jscore = { path = "javascriptcore"   , version = "0.3.0" }
rong_jscore_sys = { path = "javascriptcore/sys"   , version = "0.3.0" }
rong_arkjs = { path = "arkjs"   , version = "0.3.0" }
rong_arkjs_sys = { path = "arkjs/sys"   , version = "0.3.0" }
rong_macro = { path = "macro"   , version = "0.3.0" }
rong_test = { path = "testing/rong_test", default-features = false }
rong_test_harness = { path = "testing/rong_test_harness" }
rong_test_device = { path = "testing/rong_test_device" }
rong_modules = { path = "rong_modules"   , version = "0.3.0" }
rong_rt = { path = "rong_rt"   , version = "0.3.0", default-features = false }

# Module dependencies
rong_timer = { path = "modules/rong_timer"   , version = "0.3.0", default-features = false }
rong_console = { path = "modules/rong_console"   , version = "0.3.0", default-features = false }
rong_assert = { path = "modules/rong_assert"   , version = "0.3.0", default-features = false }
rong_fs = { path = "modules/rong_fs"   , version = "0.3.0", default-features = false }
rong_http = { path = "modules/rong_http"   , version = "0.3.0", default-features = false }
rong_encoding = { path = "modules/rong_encoding"   , version = "0.3.0", default-features = false }
rong_event = { path = "modules/rong_event"   , version = "0.3.0", default-features = false }
rong_exception = { path = "modules/rong_exception"   , version = "0.3.0", default-features = false }
rong_abort = { path = "modules/rong_abort"   , version = "0.3.0", default-features = false }
rong_url = { path = "modules/rong_url"   , version = "0.3.0", default-features = false }
rong_buffer = { path = "modules/rong_buffer"   , version = "0.3.0", default-features = false }
rong_stream = { path = "modules/rong_stream"   , version = "0.3.0", default-features = false }
rong_compression = { path = "modules/rong_compression"   , version = "0.3.0", default-features = false }
rong_command = { path = "modules/rong_command"   , version = "0.3.0", default-features = false }
rong_storage = { path = "modules/rong_storage"   , version = "0.3.0", default-features = false }
rong_worker = { path = "modules/rong_worker"   , version = "0.3.0", default-features = false }
rong_redis = { path = "modules/rong_redis"   , version = "0.3.0", default-features = false }
rong_sqlite = { path = "modules/rong_sqlite"   , version = "0.3.0", default-features = false }
rong_s3 = { path = "modules/rong_s3"   , version = "0.3.0", default-features = false }

# External dependencies
tokio = { version = "1.49", features = ["rt", "rt-multi-thread", "time", "macros", "sync", "fs", "io-util", "process", "io-std"] }
futures = "0.3.31"
thiserror = "2.0.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4", default-features = false, features = ["std", "clock"] }

# Additional common dependencies
http = { package = "http", version = "1.4" }
http-body-util = "0.1.3"
hyper = { version = "1.8.1", features = ["client", "http1"] }
hyper-util = { version = "0.1.19", features = ["client", "http1", "tokio"] }
hyper-rustls = { version = "0.27.7", default-features = false, features = ["webpki-roots", "http1", "tls12"] }
rustls = { version = "0.23", default-features = false }
flate2 = { version = "1.1.0" }
uuid = { version = "1.19.0", features = ["v4"] }
axum = { version = "0.8.8", features = ["http1"] }
nix = { version = "0.31", features = ["user", "fs"] }
syn = { version = "2.0", features = ["full"] }
bytes = "1.11.0"
tokio-stream = "0.1.18"
redis = { version = "1.0", features = ["tokio-comp", "aio"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["fmt", "env-filter"] }
smallvec = "1.15.1"


[package]
name = "rong"
version = "0.3.0"
edition = "2024"

description = "RongJS runtime and embedding API"
license = "MIT OR Apache-2.0"
repository = "https://github.com/LingXia-Dev/Rong"
homepage.workspace = true
rust-version.workspace = true
documentation = "https://docs.rs/rong"
readme = "README.md"
keywords.workspace = true
categories.workspace = true
include = [
    "Cargo.toml",
    "CHANGELOG.md",
    "LICENSE-APACHE",
    "LICENSE-MIT",
    "README.md",
    "src/**",
]
[dependencies]
rong_core = { workspace = true }
rong_rt = { workspace = true }
rong_quickjs = { workspace = true, optional = true }
rong_jscore = { workspace = true, optional = true }
rong_arkjs = { workspace = true, optional = true }
rong_macro = { workspace = true }
tokio = { workspace = true }
futures = { workspace = true }

[features]
# Library consumers must select an engine/TLS backend explicitly.
# The CLI/examples keep desktop-friendly defaults for out-of-the-box runs.
default = []
quickjs = ["dep:rong_quickjs", "rong_test/quickjs"]
jscore = ["dep:rong_jscore", "rong_test/jscore"]
arkjs = ["dep:rong_arkjs", "rong_test/arkjs"]
tls-aws-lc = ["rong_rt/tls-aws-lc"]
tls-ring = ["rong_rt/tls-ring"]

[dev-dependencies]
rong_test = { workspace = true }
bytes = { workspace = true }

[profile.test]
debug = true
