ambient_sys 0.3.1

A system abstraction for Ambient; abstracts over desktop and web. Host-only.
Documentation
[package]
name = "ambient_sys"
version = { workspace = true }
rust-version = { workspace = true }
edition = "2021"
description = "A system abstraction for Ambient; abstracts over desktop and web. Host-only."
license = "MIT OR Apache-2.0"
repository = "https://github.com/AmbientRun/Ambient"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

derive_more = { workspace = true }
flume = { workspace = true }
futures = { workspace = true }
once_cell = { workspace = true }
ordered-float = { workspace = true }
parking_lot = { workspace = true }
pin-project = { workspace = true }
slotmap = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
anyhow = { workspace = true }

time = { version = "0.3", features = ["wasm-bindgen"] }
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }

[target.'cfg(target_os = "unknown")'.dependencies]
web-sys = { version = "0.3", features = [
    "Performance",
    "Document",
    "Clipboard",
] }
js-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
gloo-timers = { version = "0.3" }

[target.'cfg(not(target_os = "unknown"))'.dependencies]
# Note: not a workspace dependency. The goal is to not use tokio outside of this `sys` abstraction at all
# Additionally, many tokio features do not compile on wasm and thus can't be set in the workspace toml
tokio = { version = "1.32", features = [
    "tracing",
    "parking_lot",
    "macros",
    "rt",
    "rt-multi-thread",
    "sync",
    "time",
    "process",
    "signal",
    "fs",
] }
tokio-util = { version = "0.7.9", features = ["codec"] }
arboard = { workspace = true }

[target.'cfg(target_os = "unknown")'.dev-dependencies]
wasm-bindgen-test = "0.3"


[dev-dependencies]
futures = { version = "0.3", features = ["executor"] }

[features]
default = ["console_error_panic_hook"]