Skip to content

Commit e9a0ef4

Browse files
authored
Rename bevy_platform_support to bevy_platform (#18813)
# Objective The goal of `bevy_platform_support` is to provide a set of platform agnostic APIs, alongside platform-specific functionality. This is a high traffic crate (providing things like HashMap and Instant). Especially in light of #18799, it deserves a friendlier / shorter name. Given that it hasn't had a full release yet, getting this change in before Bevy 0.16 makes sense. ## Solution - Rename `bevy_platform_support` to `bevy_platform`.
1 parent 88f863e commit e9a0ef4

File tree

248 files changed

+397
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+397
-407
lines changed

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bevy_reflect = { path = "../crates/bevy_reflect", features = ["functions"] }
2424
bevy_render = { path = "../crates/bevy_render" }
2525
bevy_tasks = { path = "../crates/bevy_tasks" }
2626
bevy_utils = { path = "../crates/bevy_utils" }
27-
bevy_platform_support = { path = "../crates/bevy_platform_support", default-features = false, features = [
27+
bevy_platform = { path = "../crates/bevy_platform", default-features = false, features = [
2828
"std",
2929
] }
3030

benches/benches/bevy_reflect/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use core::{fmt::Write, hint::black_box, iter, time::Duration};
22

33
use benches::bench;
4-
use bevy_platform_support::collections::HashMap;
4+
use bevy_platform::collections::HashMap;
55
use bevy_reflect::{DynamicMap, Map};
66
use criterion::{
77
criterion_group, measurement::Measurement, AxisScale, BatchSize, BenchmarkGroup, BenchmarkId,

crates/bevy_animation/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bevy_time = { path = "../bevy_time", version = "0.16.0-dev" }
2525
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev" }
2626
bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-dev" }
2727
bevy_transform = { path = "../bevy_transform", version = "0.16.0-dev" }
28-
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
28+
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
2929
"std",
3030
"serialize",
3131
] }
@@ -53,7 +53,7 @@ bevy_log = { path = "../bevy_log", version = "0.16.0-dev", default-features = fa
5353
bevy_app = { path = "../bevy_app", version = "0.16.0-dev", default-features = false, features = [
5454
"web",
5555
] }
56-
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
56+
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
5757
"web",
5858
] }
5959
bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", default-features = false, features = [

crates/bevy_animation/src/animation_curves.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ use bevy_math::curve::{
101101
Curve, Interval,
102102
};
103103
use bevy_mesh::morph::MorphWeights;
104-
use bevy_platform_support::hash::Hashed;
104+
use bevy_platform::hash::Hashed;
105105
use bevy_reflect::{FromReflect, Reflect, Reflectable, TypeInfo, Typed};
106106
use downcast_rs::{impl_downcast, Downcast};
107107

crates/bevy_animation/src/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use bevy_ecs::{
1717
resource::Resource,
1818
system::{Res, ResMut},
1919
};
20-
use bevy_platform_support::collections::HashMap;
20+
use bevy_platform::collections::HashMap;
2121
use bevy_reflect::{prelude::ReflectDefault, Reflect, ReflectSerialize};
2222
use derive_more::derive::From;
2323
use petgraph::{

crates/bevy_animation/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use bevy_app::{Animation, App, Plugin, PostUpdate};
3535
use bevy_asset::{Asset, AssetApp, AssetEvents, Assets};
3636
use bevy_ecs::{prelude::*, world::EntityMutExcept};
3737
use bevy_math::FloatOrd;
38-
use bevy_platform_support::{collections::HashMap, hash::NoOpHash};
38+
use bevy_platform::{collections::HashMap, hash::NoOpHash};
3939
use bevy_reflect::{prelude::ReflectDefault, Reflect, TypePath};
4040
use bevy_time::Time;
4141
use bevy_transform::TransformSystem;
@@ -755,10 +755,10 @@ impl AnimationCurveEvaluators {
755755
.component_property_curve_evaluators
756756
.get_or_insert_with(component_property, func),
757757
EvaluatorId::Type(type_id) => match self.type_id_curve_evaluators.entry(type_id) {
758-
bevy_platform_support::collections::hash_map::Entry::Occupied(occupied_entry) => {
758+
bevy_platform::collections::hash_map::Entry::Occupied(occupied_entry) => {
759759
&mut **occupied_entry.into_mut()
760760
}
761-
bevy_platform_support::collections::hash_map::Entry::Vacant(vacant_entry) => {
761+
bevy_platform::collections::hash_map::Entry::Vacant(vacant_entry) => {
762762
&mut **vacant_entry.insert(func())
763763
}
764764
},

crates/bevy_app/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,22 @@ std = [
4949
"downcast-rs/std",
5050
"bevy_utils/std",
5151
"bevy_tasks/std",
52-
"bevy_platform_support/std",
52+
"bevy_platform/std",
5353
]
5454

5555
## `critical-section` provides the building blocks for synchronization primitives
5656
## on all platforms, including `no_std`.
5757
critical-section = [
5858
"bevy_tasks/critical-section",
5959
"bevy_ecs/critical-section",
60-
"bevy_platform_support/critical-section",
60+
"bevy_platform/critical-section",
6161
"bevy_reflect?/critical-section",
6262
]
6363

6464
## Enables use of browser APIs.
6565
## Note this is currently only applicable on `wasm32` architectures.
6666
web = [
67-
"bevy_platform_support/web",
67+
"bevy_platform/web",
6868
"bevy_tasks/web",
6969
"bevy_reflect?/web",
7070
"dep:wasm-bindgen",
@@ -81,7 +81,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev", default-features
8181
"alloc",
8282
] }
8383
bevy_tasks = { path = "../bevy_tasks", version = "0.16.0-dev", default-features = false }
84-
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false }
84+
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false }
8585

8686
# other
8787
downcast-rs = { version = "2", default-features = false }

crates/bevy_app/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use bevy_ecs::{
1616
schedule::{InternedSystemSet, ScheduleBuildSettings, ScheduleLabel},
1717
system::{IntoObserverSystem, ScheduleSystem, SystemId, SystemInput},
1818
};
19-
use bevy_platform_support::collections::HashMap;
19+
use bevy_platform::collections::HashMap;
2020
use core::{fmt::Debug, num::NonZero, panic::AssertUnwindSafe};
2121
use log::debug;
2222

crates/bevy_app/src/plugin_group.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use alloc::{
44
string::{String, ToString},
55
vec::Vec,
66
};
7-
use bevy_platform_support::collections::hash_map::Entry;
7+
use bevy_platform::collections::hash_map::Entry;
88
use bevy_utils::TypeIdMap;
99
use core::any::TypeId;
1010
use log::{debug, warn};

crates/bevy_app/src/schedule_runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
plugin::Plugin,
44
PluginsState,
55
};
6-
use bevy_platform_support::time::Instant;
6+
use bevy_platform::time::Instant;
77
use core::time::Duration;
88

99
#[cfg(all(target_arch = "wasm32", feature = "web"))]
@@ -160,7 +160,7 @@ impl Plugin for ScheduleRunnerPlugin {
160160
loop {
161161
match tick(&mut app, wait) {
162162
Ok(Some(delay)) => {
163-
bevy_platform_support::thread::sleep(delay);
163+
bevy_platform::thread::sleep(delay);
164164
}
165165
Ok(None) => continue,
166166
Err(exit) => return exit,

0 commit comments

Comments
 (0)