[package]
name = "asupersync-browser-core"
version = "0.3.4"
edition = "2024"
license = "LicenseRef-MIT-OpenAI-Anthropic-Rider"
description = "Canonical wasm-bindgen export boundary and JS/WASM package producer for the Asupersync Browser Edition."
repository = "https://github.com/Dicklesworthstone/asupersync"
keywords = ["async", "wasm", "browser", "bindings", "structured"]
categories = ["asynchronous", "wasm", "web-programming"]

[package.metadata.asupersync_wasm_policy]
policy_version = "1.0.0"
abi_version = "1.0"
owner_track = "asupersync-v2ofj7.2"

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

[dependencies]
# Core Asupersync runtime (no wasm-bindgen in core paths).
asupersync = { version = "0.3.4", path = "..", default-features = false }

# WASM boundary tooling.
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
web-sys = { version = "0.3", features = [
    "Window",
    "WorkerGlobalScope",
    "Performance",
    "AbortController",
    "AbortSignal",
    "RequestInit",
    "Response",
    "BinaryType",
    "CloseEvent",
    "Event",
    "MessageEvent",
    "WebSocket",
    "console",
] }

# Structured serialization across the JS/WASM boundary.
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.6"
serde_json = "1.0"

[dev-dependencies]
wasm-bindgen-test = "0.3"

[features]
default = ["prod"]
# Canonical browser profiles — each activates the corresponding core profile.
minimal = ["asupersync/wasm-browser-minimal"]
dev = ["asupersync/wasm-browser-dev"]
prod = ["asupersync/wasm-browser-prod"]
deterministic = ["asupersync/wasm-browser-deterministic"]

[package.metadata.wasm-pack.profile.release]
# Browser-core release artifacts use bulk-memory instructions; wasm-opt must
# validate them instead of rejecting the optimized packaging pass.
wasm-opt = ["-Oz", "--enable-bulk-memory", "--strip-dwarf", "--strip-producers", "--vacuum"]

[lints.rust]
unsafe_code = "deny"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_panics_doc = "allow"
