Skip to content

Commit

Permalink
#main split bevy into bevy_ecs and bevy_input
Browse files Browse the repository at this point in the history
  • Loading branch information
bennobuilder committed Apr 9, 2024
1 parent b2d7c63 commit 635efbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ tokio = ["dep:tokio"]
url = ["dep:url"]
## [either](https://docs.rs/either) crate
either = ["dep:either"]
# [bevy_ecs](https://docs.rs/bevy_ecs) and [bevy_input](https://docs.rs/bevy_input) crate
bevy = ["dep:bevy_ecs", "dep:bevy_input"]
# [bevy_ecs](https://docs.rs/bevy_ecs)
bevy_ecs = ["dep:bevy_ecs"]
# [bevy_input](https://docs.rs/bevy_input)
bevy_input = ["dep:bevy_input", "dep:bevy_ecs", "dep:glam"]

[dependencies]
specta-macros = { version = "=2.0.0-rc.9", path = "./macros" }
Expand Down
5 changes: 4 additions & 1 deletion src/type/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,16 @@ impl<L: Type, R: Type> Type for either::Either<L, R> {
}
}

#[cfg(feature = "bevy")]
#[cfg(feature = "bevy_ecs")]
const _: () = {
#[derive(Type)]
#[specta(rename = "Entity", remote = bevy_ecs::entity::Entity, crate = crate, export = false)]
#[allow(dead_code)]
struct EntityDef(u64);
};

#[cfg(feature = "bevy_input")]
const _: () = {
#[derive(Type)]
#[specta(remote = bevy_input::ButtonState, crate = crate, export = false)]
#[allow(dead_code)]
Expand Down

0 comments on commit 635efbc

Please sign in to comment.