mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Feature gate bevy_remote
http transport. (#16019)
## Objective Be able to depend on the crate for the types without bringing in `smol-hyper` and other http dependencies. ## Solution Create a new `HTTP` feature that is enabled by default.
This commit is contained in:
parent
80e5d27e17
commit
26a5f7f9ca
2 changed files with 7 additions and 2 deletions
|
@ -9,6 +9,10 @@ license = "MIT OR Apache-2.0"
|
||||||
keywords = ["bevy"]
|
keywords = ["bevy"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["http"]
|
||||||
|
http = ["dep:async-io", "dep:smol-hyper"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# bevy
|
# bevy
|
||||||
bevy_app = { path = "../bevy_app", version = "0.15.0-dev" }
|
bevy_app = { path = "../bevy_app", version = "0.15.0-dev" }
|
||||||
|
@ -31,8 +35,8 @@ async-channel = "2"
|
||||||
|
|
||||||
# dependencies that will not compile on wasm
|
# dependencies that will not compile on wasm
|
||||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||||
async-io = "2"
|
async-io = { version = "2", optional = true }
|
||||||
smol-hyper = "0.1"
|
smol-hyper = { version = "0.1", optional = true }
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
@ -315,6 +315,7 @@ use serde_json::Value;
|
||||||
use std::sync::RwLock;
|
use std::sync::RwLock;
|
||||||
|
|
||||||
pub mod builtin_methods;
|
pub mod builtin_methods;
|
||||||
|
#[cfg(feature = "http")]
|
||||||
pub mod http;
|
pub mod http;
|
||||||
|
|
||||||
const CHANNEL_SIZE: usize = 16;
|
const CHANNEL_SIZE: usize = 16;
|
||||||
|
|
Loading…
Reference in a new issue