[package] name = "bevy_simplenet" description = "Simple server/client channel implemented over websockets with support for Bevy" authors = ["koe "] version = "0.13.2" edition = "2021" keywords = ["gamedev", "networking", "wasm"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/UkoeHB/bevy_simplenet" [lib] path = "src/lib.rs" doctest = false test = false [[test]] name = "tests" path = "tests/test/mod.rs" doctest = false required-features = ["client", "server"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] default = ["bevy", "client", "server"] # Enable bevy integration. bevy = ["dep:bevy_ecs"] # Enable clients. client = [] # Enable servers. server = ["auth", "dep:axum", "dep:axum-server", "ezsockets/axum", "ezsockets/server", "dep:tokio"] # Enable constructing and validating AuthTokens. Typically not needed on clients. auth = ["dep:rand", "dep:ed25519-dalek"] # Enable server TLS with tls-rustls. tls-rustls = ["axum-server/tls-rustls"] # Enable server TLS with tls-openssl. tls-openssl = ["axum-server/tls-openssl"] [dependencies] async-trait = { version = "0.1" } bincode = { version = "1.3" } cfg-if = { version = "1.0" } crossbeam = { version = "0.8" } enfync = { version = "0.1" } form_urlencoded = { version = "1.2" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } serde_with = { version = "3.0" } tracing = { version = "0.1" } url = { version = "2.4" } wasm-timer = { version = "0.2" } axum = { version = "0.6", optional = true } axum-server = { version = "0.5", optional = true } bevy_ecs = { version = "0.14", optional = true } ed25519-dalek = { version = "2.1.1", optional = true, features = ["rand_core"] } rand = { version = "0.8", optional = true } tokio = { version = "1.29", optional = true, features = ["sync"] } [dependencies.ezsockets] version = "0.6.2" default-features = false [target.'cfg(not(target_family = "wasm"))'.dependencies.ezsockets] version = "0.6.2" default-features = false features = [ "native_client" ] #todo: how to configure target on 'client' feature? [target.'cfg(target_family = "wasm")'.dependencies.ezsockets] version = "0.6.2" default-features = false features = [ "wasm_client" ] #todo: how to configure target on 'client' feature? [dev-dependencies] tracing-subscriber = { version = "0.3" } [workspace] members = [ "examples/client", "examples/common", "examples/server", ] [profile.release] lto = true strip = true #minimize binary size with symbol stripping codegen-units = 1 #maximize performance [profile.release-small] inherits = "release" opt-level = "s" lto = "fat" [profile.release-small.package."*"] opt-level = "s" strip = true [profile.release-wasm] inherits = "release-small" panic = "abort" [profile.release-wasm.package."*"] opt-level = "s" strip = true