Skip to content

Rename bevy_platform_support to bevy_platform #18813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bevy_reflect = { path = "../crates/bevy_reflect", features = ["functions"] }
bevy_render = { path = "../crates/bevy_render" }
bevy_tasks = { path = "../crates/bevy_tasks" }
bevy_utils = { path = "../crates/bevy_utils" }
bevy_platform_support = { path = "../crates/bevy_platform_support", default-features = false, features = [
bevy_platform = { path = "../crates/bevy_platform", default-features = false, features = [
"std",
] }

Expand Down
2 changes: 1 addition & 1 deletion benches/benches/bevy_reflect/map.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::{fmt::Write, hint::black_box, iter, time::Duration};

use benches::bench;
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_reflect::{DynamicMap, Map};
use criterion::{
criterion_group, measurement::Measurement, AxisScale, BatchSize, BenchmarkGroup, BenchmarkId,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bevy_time = { path = "../bevy_time", version = "0.16.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev" }
bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-dev" }
bevy_transform = { path = "../bevy_transform", version = "0.16.0-dev" }
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
"std",
"serialize",
] }
Expand Down Expand Up @@ -53,7 +53,7 @@ bevy_log = { path = "../bevy_log", version = "0.16.0-dev", default-features = fa
bevy_app = { path = "../bevy_app", version = "0.16.0-dev", default-features = false, features = [
"web",
] }
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
"web",
] }
bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_animation/src/animation_curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ use bevy_math::curve::{
Curve, Interval,
};
use bevy_mesh::morph::MorphWeights;
use bevy_platform_support::hash::Hashed;
use bevy_platform::hash::Hashed;
use bevy_reflect::{FromReflect, Reflect, Reflectable, TypeInfo, Typed};
use downcast_rs::{impl_downcast, Downcast};

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_animation/src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use bevy_ecs::{
resource::Resource,
system::{Res, ResMut},
};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_reflect::{prelude::ReflectDefault, Reflect, ReflectSerialize};
use derive_more::derive::From;
use petgraph::{
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use bevy_app::{Animation, App, Plugin, PostUpdate};
use bevy_asset::{Asset, AssetApp, AssetEvents, Assets};
use bevy_ecs::{prelude::*, world::EntityMutExcept};
use bevy_math::FloatOrd;
use bevy_platform_support::{collections::HashMap, hash::NoOpHash};
use bevy_platform::{collections::HashMap, hash::NoOpHash};
use bevy_reflect::{prelude::ReflectDefault, Reflect, TypePath};
use bevy_time::Time;
use bevy_transform::TransformSystem;
Expand Down Expand Up @@ -755,10 +755,10 @@ impl AnimationCurveEvaluators {
.component_property_curve_evaluators
.get_or_insert_with(component_property, func),
EvaluatorId::Type(type_id) => match self.type_id_curve_evaluators.entry(type_id) {
bevy_platform_support::collections::hash_map::Entry::Occupied(occupied_entry) => {
bevy_platform::collections::hash_map::Entry::Occupied(occupied_entry) => {
&mut **occupied_entry.into_mut()
}
bevy_platform_support::collections::hash_map::Entry::Vacant(vacant_entry) => {
bevy_platform::collections::hash_map::Entry::Vacant(vacant_entry) => {
&mut **vacant_entry.insert(func())
}
},
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ std = [
"downcast-rs/std",
"bevy_utils/std",
"bevy_tasks/std",
"bevy_platform_support/std",
"bevy_platform/std",
]

## `critical-section` provides the building blocks for synchronization primitives
## on all platforms, including `no_std`.
critical-section = [
"bevy_tasks/critical-section",
"bevy_ecs/critical-section",
"bevy_platform_support/critical-section",
"bevy_platform/critical-section",
"bevy_reflect?/critical-section",
]

## Enables use of browser APIs.
## Note this is currently only applicable on `wasm32` architectures.
web = [
"bevy_platform_support/web",
"bevy_platform/web",
"bevy_tasks/web",
"bevy_reflect?/web",
"dep:wasm-bindgen",
Expand All @@ -81,7 +81,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev", default-features
"alloc",
] }
bevy_tasks = { path = "../bevy_tasks", version = "0.16.0-dev", default-features = false }
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false }
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false }

# other
downcast-rs = { version = "2", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bevy_ecs::{
schedule::{InternedSystemSet, ScheduleBuildSettings, ScheduleLabel},
system::{IntoObserverSystem, ScheduleSystem, SystemId, SystemInput},
};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use core::{fmt::Debug, num::NonZero, panic::AssertUnwindSafe};
use log::debug;

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_app/src/plugin_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloc::{
string::{String, ToString},
vec::Vec,
};
use bevy_platform_support::collections::hash_map::Entry;
use bevy_platform::collections::hash_map::Entry;
use bevy_utils::TypeIdMap;
use core::any::TypeId;
use log::{debug, warn};
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_app/src/schedule_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
plugin::Plugin,
PluginsState,
};
use bevy_platform_support::time::Instant;
use bevy_platform::time::Instant;
use core::time::Duration;

#[cfg(all(target_arch = "wasm32", feature = "web"))]
Expand Down Expand Up @@ -160,7 +160,7 @@ impl Plugin for ScheduleRunnerPlugin {
loop {
match tick(&mut app, wait) {
Ok(Some(delay)) => {
bevy_platform_support::thread::sleep(delay);
bevy_platform::thread::sleep(delay);
}
Ok(None) => continue,
Err(exit) => return exit,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_app/src/sub_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy_ecs::{
schedule::{InternedScheduleLabel, InternedSystemSet, ScheduleBuildSettings, ScheduleLabel},
system::{ScheduleSystem, SystemId, SystemInput},
};
use bevy_platform_support::collections::{HashMap, HashSet};
use bevy_platform::collections::{HashMap, HashSet};
use core::fmt::Debug;

#[cfg(feature = "trace")]
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_app/src/task_pool_plugin.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{App, Plugin};

use alloc::string::ToString;
use bevy_platform_support::sync::Arc;
use bevy_platform::sync::Arc;
use bevy_tasks::{AsyncComputeTaskPool, ComputeTaskPool, IoTaskPool, TaskPoolBuilder};
use core::fmt::Debug;
use log::trace;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-dev", features = [
] }
bevy_tasks = { path = "../bevy_tasks", version = "0.16.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev" }
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
"std",
] }

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/asset_changed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use bevy_ecs::{
storage::{Table, TableRow},
world::unsafe_world_cell::UnsafeWorldCell,
};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use core::marker::PhantomData;
use disqualified::ShortName;
use tracing::error;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy_ecs::{
resource::Resource,
system::{Res, ResMut, SystemChangeTick},
};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_reflect::{Reflect, TypePath};
use core::{any::TypeId, iter::Enumerate, marker::PhantomData, sync::atomic::AtomicU32};
use crossbeam_channel::{Receiver, Sender};
Expand Down Expand Up @@ -600,7 +600,7 @@ impl<A: Asset> Assets<A> {
pub struct AssetsMutIterator<'a, A: Asset> {
queued_events: &'a mut Vec<AssetEvent<A>>,
dense_storage: Enumerate<core::slice::IterMut<'a, Entry<A>>>,
hash_map: bevy_platform_support::collections::hash_map::IterMut<'a, Uuid, A>,
hash_map: bevy_platform::collections::hash_map::IterMut<'a, Uuid, A>,
}

impl<'a, A: Asset> Iterator for AssetsMutIterator<'a, A> {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ pub enum UntypedAssetConversionError {
#[cfg(test)]
mod tests {
use alloc::boxed::Box;
use bevy_platform_support::hash::FixedHasher;
use bevy_platform::hash::FixedHasher;
use bevy_reflect::PartialReflect;
use core::hash::BuildHasher;

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ mod tests {
fn hash<T: Hash>(data: &T) -> u64 {
use core::hash::BuildHasher;

bevy_platform_support::hash::FixedHasher.hash_one(data)
bevy_platform::hash::FixedHasher.hash_one(data)
}

/// Typed and Untyped `AssetIds` should be equivalent to each other and themselves
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/embedded/embedded_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::io::{
AssetSourceEvent, AssetWatcher,
};
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use core::time::Duration;
use notify_debouncer_full::{notify::RecommendedWatcher, Debouncer, RecommendedCache};
use parking_lot::RwLock;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/embedded/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct EmbeddedAssetRegistry {
dir: Dir,
#[cfg(feature = "embedded_watcher")]
root_paths: alloc::sync::Arc<
parking_lot::RwLock<bevy_platform_support::collections::HashMap<Box<Path>, PathBuf>>,
parking_lot::RwLock<bevy_platform::collections::HashMap<Box<Path>, PathBuf>>,
>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/gated.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::io::{AssetReader, AssetReaderError, PathStream, Reader};
use alloc::{boxed::Box, sync::Arc};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use crossbeam_channel::{Receiver, Sender};
use parking_lot::RwLock;
use std::path::Path;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/memory.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::io::{AssetReader, AssetReaderError, PathStream, Reader};
use alloc::{borrow::ToOwned, boxed::Box, sync::Arc, vec::Vec};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use core::{pin::Pin, task::Poll};
use futures_io::AsyncRead;
use futures_lite::{ready, Stream};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloc::{
};
use atomicow::CowArc;
use bevy_ecs::resource::Resource;
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use core::{fmt::Display, hash::Hash, time::Duration};
use thiserror::Error;
use tracing::{error, warn};
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ use bevy_ecs::{
schedule::{IntoScheduleConfigs, SystemSet},
world::FromWorld,
};
use bevy_platform_support::collections::HashSet;
use bevy_platform::collections::HashSet;
use bevy_reflect::{FromReflect, GetTypeRegistration, Reflect, TypePath};
use core::any::TypeId;
use tracing::error;
Expand Down Expand Up @@ -686,7 +686,7 @@ mod tests {
prelude::*,
schedule::{LogLevel, ScheduleBuildSettings},
};
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_reflect::TypePath;
use core::time::Duration;
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use alloc::{
};
use atomicow::CowArc;
use bevy_ecs::world::World;
use bevy_platform_support::collections::{HashMap, HashSet};
use bevy_platform::collections::{HashMap, HashSet};
use bevy_tasks::{BoxedFuture, ConditionalSendFuture};
use core::any::{Any, TypeId};
use downcast_rs::{impl_downcast, Downcast};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/processor/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloc::{
vec::Vec,
};
use async_fs::File;
use bevy_platform_support::collections::HashSet;
use bevy_platform::collections::HashSet;
use futures_lite::{AsyncReadExt, AsyncWriteExt};
use std::path::PathBuf;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ use crate::{
};
use alloc::{borrow::ToOwned, boxed::Box, collections::VecDeque, sync::Arc, vec, vec::Vec};
use bevy_ecs::prelude::*;
use bevy_platform_support::collections::{HashMap, HashSet};
use bevy_platform::collections::{HashMap, HashSet};
use bevy_tasks::IoTaskPool;
use futures_io::ErrorKind;
use futures_lite::{AsyncReadExt, AsyncWriteExt, StreamExt};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/saver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};
use alloc::boxed::Box;
use atomicow::CowArc;
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_tasks::{BoxedFuture, ConditionalSendFuture};
use core::{borrow::Borrow, hash::Hash, ops::Deref};
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/server/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use alloc::{
vec::Vec,
};
use bevy_ecs::world::World;
use bevy_platform_support::collections::{hash_map::Entry, HashMap, HashSet};
use bevy_platform::collections::{hash_map::Entry, HashMap, HashSet};
use bevy_tasks::Task;
use bevy_utils::TypeIdMap;
use core::{any::TypeId, task::Waker};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/server/loaders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use async_broadcast::RecvError;
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_tasks::IoTaskPool;
use bevy_utils::TypeIdMap;
use core::any::TypeId;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use alloc::{
};
use atomicow::CowArc;
use bevy_ecs::prelude::*;
use bevy_platform_support::collections::HashSet;
use bevy_platform::collections::HashSet;
use bevy_tasks::IoTaskPool;
use core::{any::TypeId, future::Future, panic::AssertUnwindSafe, task::Poll};
use crossbeam_channel::{Receiver, Sender};
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/transformer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{meta::Settings, Asset, ErasedLoadedAsset, Handle, LabeledAsset, UntypedHandle};
use alloc::boxed::Box;
use atomicow::CowArc;
use bevy_platform_support::collections::HashMap;
use bevy_platform::collections::HashMap;
use bevy_tasks::ConditionalSendFuture;
use core::{
borrow::Borrow,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bevy_transform = { path = "../bevy_transform", version = "0.16.0-dev" }
bevy_math = { path = "../bevy_math", version = "0.16.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev" }
bevy_window = { path = "../bevy_window", version = "0.16.0-dev" }
bevy_platform_support = { path = "../bevy_platform_support", version = "0.16.0-dev", default-features = false, features = [
bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-features = false, features = [
"std",
"serialize",
] }
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/src/auto_exposure/buffers.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy_ecs::prelude::*;
use bevy_platform_support::collections::{hash_map::Entry, HashMap};
use bevy_platform::collections::{hash_map::Entry, HashMap};
use bevy_render::{
render_resource::{StorageBuffer, UniformBuffer},
renderer::{RenderDevice, RenderQueue},
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/src/core_2d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub mod graph {
use core::ops::Range;

use bevy_asset::UntypedAssetId;
use bevy_platform_support::collections::{HashMap, HashSet};
use bevy_platform::collections::{HashMap, HashSet};
use bevy_render::{
batching::gpu_preprocessing::GpuPreprocessingMode,
render_phase::PhaseItemBatchSetKey,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/src/core_3d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ use bevy_color::LinearRgba;
use bevy_ecs::prelude::*;
use bevy_image::BevyDefault;
use bevy_math::FloatOrd;
use bevy_platform_support::collections::{HashMap, HashSet};
use bevy_platform::collections::{HashMap, HashSet};
use bevy_render::{
camera::{Camera, ExtractedCamera},
extract_component::ExtractComponentPlugin,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_core_pipeline/src/oit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use bevy_app::prelude::*;
use bevy_asset::{load_internal_asset, weak_handle, Handle};
use bevy_ecs::{component::*, prelude::*};
use bevy_math::UVec2;
use bevy_platform_support::collections::HashSet;
use bevy_platform_support::time::Instant;
use bevy_platform::collections::HashSet;
use bevy_platform::time::Instant;
use bevy_reflect::{std_traits::ReflectDefault, Reflect};
use bevy_render::{
camera::{Camera, ExtractedCamera},
Expand Down
Loading