[package]
name = "pylon-workers"
edition.workspace = true
license.workspace = true
description.workspace = true
homepage.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = []
# Enable to compile the Workers fetch handler (WASM target only).
workers = ["dep:worker", "dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:futures"]

[dependencies]
pylon-kernel = { path = "../core", version = "0.2.9" }
pylon-http = { path = "../http", version = "0.2.9" }
pylon-router = { path = "../router", version = "0.2.9" }
pylon-auth = { path = "../auth", version = "0.2.9" }
pylon-policy = { path = "../policy", version = "0.2.9" }
pylon-sync = { path = "../sync", version = "0.2.9" }
pylon-realtime = { path = "../realtime", version = "0.2.9" }
serde = { workspace = true }
serde_json = { workspace = true }

# Optional deps — only pulled in when `workers` feature is enabled.
worker = { version = "0.5", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
futures = { version = "0.3", optional = true }
