From b1c583f500ec39940a9c5a5c44c8a8ec17788148 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 6 Apr 2020 16:09:58 -0700 Subject: [PATCH] crate-ify serialization. crate-ification is now complete! --- Cargo.toml | 13 ++++--------- bevy_serialization/Cargo.toml | 15 +++++++++++++++ .../mod.rs => bevy_serialization/src/lib.rs | 0 .../src}/world.rs | 0 src/lib.rs | 3 +-- tools/example_showcase.sh | 2 +- 6 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 bevy_serialization/Cargo.toml rename src/serialization/mod.rs => bevy_serialization/src/lib.rs (100%) rename {src/serialization => bevy_serialization/src}/world.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index b75fe2ee4c..fc29090a43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ bevy_derive = { path = "bevy_derive" } bevy_diagnostic = { path = "bevy_diagnostic" } bevy_input = { path = "bevy_input" } bevy_render = { path = "bevy_render" } +bevy_serialization = { path = "bevy_serialization" } bevy_transform = { path = "bevy_transform" } bevy_ui = { path = "bevy_ui" } bevy_window = { path = "bevy_window" } @@ -23,21 +24,15 @@ bevy_wgpu = { path = "bevy_wgpu", optional = true } bevy_winit = { path = "bevy_winit", optional = true } legion = { path = "bevy_legion", features = ["serialize"] } -# logging +# other log = { version = "0.4", features = ["release_max_level_info"] } - -# misc glam = "0.8.6" -serde = { version = "1", features = ["derive"]} -erased-serde = "0.3" -type-uuid = "0.1" -# TODO: replace once_cell with std equivalent if/when this lands: https://github.com/rust-lang/rfcs/pull/2788 -once_cell = "1.3.1" -uuid = { version = "0.8", features = ["v4"] } [dev-dependencies] rand = "0.7.2" +serde = { version = "1", features = ["derive"]} serde_json = "1.0" +type-uuid = "0.1" env_logger = "0.7" [profile.dev] diff --git a/bevy_serialization/Cargo.toml b/bevy_serialization/Cargo.toml new file mode 100644 index 0000000000..994dc7cce1 --- /dev/null +++ b/bevy_serialization/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "bevy_serialization" +version = "0.1.0" +authors = ["Carter Anderson "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] + +legion = { path = "../bevy_legion", features = ["serialize"] } +serde = { version = "1", features = ["derive"]} +erased-serde = "0.3" +type-uuid = "0.1" +uuid = { version = "0.8", features = ["v4"] } \ No newline at end of file diff --git a/src/serialization/mod.rs b/bevy_serialization/src/lib.rs similarity index 100% rename from src/serialization/mod.rs rename to bevy_serialization/src/lib.rs diff --git a/src/serialization/world.rs b/bevy_serialization/src/world.rs similarity index 100% rename from src/serialization/world.rs rename to bevy_serialization/src/world.rs diff --git a/src/lib.rs b/src/lib.rs index a78f3bfc8f..97c72ad3a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![feature(min_specialization)] pub mod prelude; -pub mod serialization; pub use bevy_app as app; pub use bevy_asset as asset; @@ -8,13 +7,13 @@ pub use bevy_core as core; pub use bevy_diagnostic as diagnostic; pub use bevy_input as input; pub use bevy_render as render; +pub use bevy_serialization as serialization; pub use bevy_transform as transform; pub use bevy_ui as ui; pub use bevy_window as window; pub use glam as math; pub use legion; -pub use once_cell; use app::AppBuilder; diff --git a/tools/example_showcase.sh b/tools/example_showcase.sh index 5510c11494..5f7d9d0761 100644 --- a/tools/example_showcase.sh +++ b/tools/example_showcase.sh @@ -2,7 +2,7 @@ duration='3' run_example() { - timeout "$duration" cargo run --release --example $1 + timeout "$duration" cargo run --example $1 } for entry in examples/*