diff --git a/.cargo/config_fast_builds.toml b/.cargo/config_fast_builds.toml index 7270a7684b..ddb5ca2656 100644 --- a/.cargo/config_fast_builds.toml +++ b/.cargo/config_fast_builds.toml @@ -7,9 +7,9 @@ # # ## LLD # -# LLD is a linker from the LLVM project that supports Linux, Windows, MacOS, and WASM. It has the greatest +# LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest # platform support and the easiest installation process. It is enabled by default in this file for Linux -# and Windows. On MacOS, the default linker yields higher performance than LLD and is used instead. +# and Windows. On macOS, the default linker yields higher performance than LLD and is used instead. # # To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]` # for Windows) and follow the steps under `LLD linker`. @@ -25,7 +25,7 @@ # your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by # *uncommenting* its `-Clink-arg=...` line. # -# There is a fork of Mold named Sold that supports MacOS, but it is unmaintained and is about the same speed as +# There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as # the default ld64 linker. For this reason, it is not included in this file. # # For more information, please see Mold's repository at . @@ -142,7 +142,7 @@ rustflags = [ ] # Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' -# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. +# In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains. # [profile.dev] # debug = 1 diff --git a/.github/actions/install-linux-deps/action.yml b/.github/actions/install-linux-deps/action.yml index 179c766a94..00b904a514 100644 --- a/.github/actions/install-linux-deps/action.yml +++ b/.github/actions/install-linux-deps/action.yml @@ -12,7 +12,7 @@ # repository before you can use this action. # # This action will only install dependencies when the current operating system is Linux. It will do -# nothing on any other OS (MacOS, Windows). +# nothing on any other OS (macOS, Windows). name: Install Linux dependencies description: Installs the dependencies necessary to build Bevy on Linux. diff --git a/.github/start-wasm-example/tests/wasm_example.spec.ts b/.github/start-wasm-example/tests/wasm_example.spec.ts index 6d7a6676d1..9165d00f98 100644 --- a/.github/start-wasm-example/tests/wasm_example.spec.ts +++ b/.github/start-wasm-example/tests/wasm_example.spec.ts @@ -6,7 +6,7 @@ test.beforeEach(async ({ page }) => { const MAX_TIMEOUT_FOR_TEST = 300_000; -test.describe('WASM example', () => { +test.describe('Wasm example', () => { test('Wait for success', async ({ page }, testInfo) => { let start = new Date().getTime(); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13d3015a5b..b1e75e1d44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,7 @@ jobs: run: cargo run -p ci -- lints miri: - # Explicity use MacOS 14 to take advantage of M1 chip. + # Explicity use macOS 14 to take advantage of M1 chip. runs-on: macos-14 timeout-minutes: 60 steps: @@ -231,7 +231,7 @@ jobs: run-examples-macos-metal: - # Explicity use MacOS 14 to take advantage of M1 chip. + # Explicity use macOS 14 to take advantage of M1 chip. runs-on: macos-14 timeout-minutes: 30 steps: diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml index 778d8a27a2..f5fab3f976 100644 --- a/.github/workflows/validation-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -209,7 +209,7 @@ jobs: npx playwright install --with-deps cd ../.. - - name: First WASM build + - name: First Wasm build run: | cargo build --release --example ui --target wasm32-unknown-unknown diff --git a/Cargo.toml b/Cargo.toml index 47831491c6..efee865286 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -354,7 +354,7 @@ reflect_functions = ["bevy_internal/reflect_functions"] [dependencies] bevy_internal = { path = "crates/bevy_internal", version = "0.15.0-dev", default-features = false } -# WASM does not support dynamic linking. +# Wasm does not support dynamic linking. [target.'cfg(not(target_family = "wasm"))'.dependencies] bevy_dylib = { path = "crates/bevy_dylib", version = "0.15.0-dev", default-features = false, optional = true } @@ -760,7 +760,7 @@ doc-scrape-examples = true name = "Lines" description = "Create a custom material to draw 3d lines" category = "3D Rendering" -# WASM does not support the `POLYGON_MODE_LINE` feature. +# Wasm does not support the `POLYGON_MODE_LINE` feature. wasm = false [[example]] diff --git a/clippy.toml b/clippy.toml index faecf7d5af..ccf511898b 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,7 +1,7 @@ doc-valid-idents = [ "GilRs", "glTF", - "MacOS", + "macOS", "NVidia", "OpenXR", "sRGB", diff --git a/crates/bevy_app/src/panic_handler.rs b/crates/bevy_app/src/panic_handler.rs index 89833a0140..94bb1c206c 100644 --- a/crates/bevy_app/src/panic_handler.rs +++ b/crates/bevy_app/src/panic_handler.rs @@ -1,5 +1,5 @@ //! This module provides panic handlers for [Bevy](https://bevyengine.org) -//! apps, and automatically configures platform specifics (i.e. WASM or Android). +//! apps, and automatically configures platform specifics (i.e. Wasm or Android). //! //! By default, the [`PanicHandlerPlugin`] from this crate is included in Bevy's `DefaultPlugins`. //! @@ -11,7 +11,7 @@ use crate::Plugin; /// Adds sensible panic handlers to Apps. This plugin is part of the `DefaultPlugins`. Adding /// this plugin will setup a panic hook appropriate to your target platform: -/// * On WASM, uses [`console_error_panic_hook`](https://crates.io/crates/console_error_panic_hook), logging +/// * On Wasm, uses [`console_error_panic_hook`](https://crates.io/crates/console_error_panic_hook), logging /// to the browser console. /// * Other platforms are currently not setup. /// diff --git a/crates/bevy_asset/src/io/mod.rs b/crates/bevy_asset/src/io/mod.rs index 5f1ae6cb84..ef2dad765a 100644 --- a/crates/bevy_asset/src/io/mod.rs +++ b/crates/bevy_asset/src/io/mod.rs @@ -1,8 +1,8 @@ #[cfg(all(feature = "file_watcher", target_arch = "wasm32"))] compile_error!( "The \"file_watcher\" feature for hot reloading does not work \ - on WASM.\nDisable \"file_watcher\" \ - when compiling to WASM" + on Wasm.\nDisable \"file_watcher\" \ + when compiling to Wasm" ); #[cfg(target_os = "android")] diff --git a/crates/bevy_asset/src/io/wasm.rs b/crates/bevy_asset/src/io/wasm.rs index 98163e43a8..6378556fe0 100644 --- a/crates/bevy_asset/src/io/wasm.rs +++ b/crates/bevy_asset/src/io/wasm.rs @@ -23,7 +23,7 @@ extern "C" { fn worker(this: &Global) -> JsValue; } -/// Reader implementation for loading assets via HTTP in WASM. +/// Reader implementation for loading assets via HTTP in Wasm. pub struct HttpWasmAssetReader { root_path: PathBuf, } diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs index f3da27d83f..474eb0c287 100644 --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -153,7 +153,7 @@ impl AssetProcessor { /// Starts the processor in a background thread. pub fn start(_processor: Res) { #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] - error!("Cannot run AssetProcessor in single threaded mode (or WASM) yet."); + error!("Cannot run AssetProcessor in single threaded mode (or Wasm) yet."); #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] { let processor = _processor.clone(); @@ -323,7 +323,7 @@ impl AssetProcessor { AssetPath::from_path(&path).with_source(source.id()) ); #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] - error!("AddFolder event cannot be handled in single threaded mode (or WASM) yet."); + error!("AddFolder event cannot be handled in single threaded mode (or Wasm) yet."); #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] IoTaskPool::get().scope(|scope| { scope.spawn(async move { diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index bbcab058cc..3ef2dbcfa8 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -24,7 +24,7 @@ bevy_tasks = { path = "../bevy_tasks", version = "0.15.0-dev" } const-fnv1a-hash = "1.1.0" -# MacOS +# macOS [target.'cfg(all(target_os="macos"))'.dependencies] # Some features of sysinfo are not supported by apple. This will disable those features on apple devices sysinfo = { version = "0.31.0", optional = true, default-features = false, features = [ diff --git a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs index d968c27ae4..9037c6a8f8 100644 --- a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs @@ -11,7 +11,7 @@ use bevy_ecs::system::Resource; /// * linux, /// * windows, /// * android, -/// * macos +/// * macOS /// /// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets /// @@ -48,7 +48,7 @@ pub struct SystemInfo { pub memory: String, } -// NOTE: sysinfo fails to compile when using bevy dynamic or on iOS and does nothing on wasm +// NOTE: sysinfo fails to compile when using bevy dynamic or on iOS and does nothing on Wasm #[cfg(all( any( target_os = "linux", diff --git a/crates/bevy_ecs/src/schedule/executor/mod.rs b/crates/bevy_ecs/src/schedule/executor/mod.rs index 3d76fdb184..10197af3e4 100644 --- a/crates/bevy_ecs/src/schedule/executor/mod.rs +++ b/crates/bevy_ecs/src/schedule/executor/mod.rs @@ -30,7 +30,7 @@ pub(super) trait SystemExecutor: Send + Sync { /// Specifies how a [`Schedule`](super::Schedule) will be run. /// /// The default depends on the target platform: -/// - [`SingleThreaded`](ExecutorKind::SingleThreaded) on WASM. +/// - [`SingleThreaded`](ExecutorKind::SingleThreaded) on Wasm. /// - [`MultiThreaded`](ExecutorKind::MultiThreaded) everywhere else. #[derive(PartialEq, Eq, Default, Debug, Copy, Clone)] pub enum ExecutorKind { diff --git a/crates/bevy_input/src/keyboard.rs b/crates/bevy_input/src/keyboard.rs index 37d58bd476..0a9109e46b 100644 --- a/crates/bevy_input/src/keyboard.rs +++ b/crates/bevy_input/src/keyboard.rs @@ -840,7 +840,7 @@ pub enum Key { /// Scroll up or display previous page of content. PageUp, /// Used to remove the character to the left of the cursor. This key value is also used for - /// the key labeled `Delete` on MacOS keyboards. + /// the key labeled `Delete` on macOS keyboards. Backspace, /// Remove the currently selected input. Clear, @@ -851,7 +851,7 @@ pub enum Key { /// Cut the current selection. (`APPCOMMAND_CUT`) Cut, /// Used to delete the character to the right of the cursor. This key value is also used for the - /// key labeled `Delete` on MacOS keyboards when `Fn` is active. + /// key labeled `Delete` on macOS keyboards when `Fn` is active. Delete, /// The Erase to End of Field key. This key deletes all characters from the current cursor /// position to the end of the current field. diff --git a/crates/bevy_log/src/lib.rs b/crates/bevy_log/src/lib.rs index f1febadba6..c2fdd1639b 100644 --- a/crates/bevy_log/src/lib.rs +++ b/crates/bevy_log/src/lib.rs @@ -5,7 +5,7 @@ )] //! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org) -//! apps, and automatically configures platform specific log handlers (i.e. WASM or Android). +//! apps, and automatically configures platform specific log handlers (i.e. Wasm or Android). //! //! The macros provided for logging are reexported from [`tracing`](https://docs.rs/tracing), //! and behave identically to it. @@ -75,7 +75,7 @@ pub(crate) struct FlushGuard(SyncCell); /// logging to `stdout`. /// * Using [`android_log-sys`](https://crates.io/crates/android_log-sys) on Android, /// logging to Android logs. -/// * Using [`tracing-wasm`](https://crates.io/crates/tracing-wasm) in WASM, logging +/// * Using [`tracing-wasm`](https://crates.io/crates/tracing-wasm) in Wasm, logging /// to the browser console. /// /// You can configure this plugin. diff --git a/crates/bevy_pbr/src/meshlet/mod.rs b/crates/bevy_pbr/src/meshlet/mod.rs index edc1b118e6..a55dc42247 100644 --- a/crates/bevy_pbr/src/meshlet/mod.rs +++ b/crates/bevy_pbr/src/meshlet/mod.rs @@ -108,7 +108,7 @@ const MESHLET_MESH_MATERIAL_SHADER_HANDLE: Handle = /// This plugin is not compatible with [`Msaa`]. Any camera rendering a [`MeshletMesh`] must have /// [`Msaa`] set to [`Msaa::Off`]. /// -/// This plugin does not work on WASM. +/// This plugin does not work on Wasm. /// /// Mixing forward+prepass and deferred rendering for opaque materials is not currently supported when using this plugin. /// You must use one or the other by setting [`crate::DefaultOpaqueRendererMethod`]. diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index e332810c08..1ebe24ca9a 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -66,7 +66,7 @@ image = { version = "0.25.2", default-features = false } # misc codespan-reporting = "0.11.0" -# `fragile-send-sync-non-atomic-wasm` feature means we can't use WASM threads for rendering +# `fragile-send-sync-non-atomic-wasm` feature means we can't use Wasm threads for rendering # It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm. # When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing # and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread. diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index 4992ee9ed6..6e9b712535 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -464,7 +464,7 @@ pub struct PipelineCache { waiting_pipelines: HashSet, new_pipelines: Mutex>, /// If `true`, disables asynchronous pipeline compilation. - /// This has no effect on MacOS, wasm, or without the `multi_threaded` feature. + /// This has no effect on macOS, wasm, or without the `multi_threaded` feature. synchronous_pipeline_compilation: bool, } diff --git a/crates/bevy_tasks/README.md b/crates/bevy_tasks/README.md index 1d1a7fb904..91ac95dce8 100644 --- a/crates/bevy_tasks/README.md +++ b/crates/bevy_tasks/README.md @@ -22,7 +22,7 @@ It is based on [`async-executor`][async-executor], a lightweight executor that a In order to be able to optimize task execution in multi-threaded environments, bevy provides three different thread pools via which tasks of different kinds can be spawned. (The same API is used in single-threaded environments, even if execution is limited to a single thread. -This currently applies to WASM targets.) +This currently applies to Wasm targets.) The determining factor for what kind of work should go in each pool is latency requirements: * For CPU-intensive work (tasks that generally spin until completion) we have a standard diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs index e804313da7..14a227301e 100644 --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -49,7 +49,7 @@ use std::{ #[cfg(not(target_arch = "wasm32"))] mod conditional_send { - /// Use [`ConditionalSend`] to mark an optional Send trait bound. Useful as on certain platforms (eg. WASM), + /// Use [`ConditionalSend`] to mark an optional Send trait bound. Useful as on certain platforms (eg. Wasm), /// futures aren't Send. pub trait ConditionalSend: Send {} impl ConditionalSend for T {} @@ -64,7 +64,7 @@ mod conditional_send { pub use conditional_send::*; -/// Use [`ConditionalSendFuture`] for a future with an optional Send trait bound, as on certain platforms (eg. WASM), +/// Use [`ConditionalSendFuture`] for a future with an optional Send trait bound, as on certain platforms (eg. Wasm), /// futures aren't Send. pub trait ConditionalSendFuture: std::future::Future + ConditionalSend {} impl ConditionalSendFuture for T {} diff --git a/crates/bevy_winit/src/state.rs b/crates/bevy_winit/src/state.rs index 6133eee6cf..abafadda1f 100644 --- a/crates/bevy_winit/src/state.rs +++ b/crates/bevy_winit/src/state.rs @@ -768,7 +768,7 @@ pub fn winit_runner(mut app: App) -> AppExit { let mut runner_state = WinitAppRunnerState::new(app); trace!("starting winit event loop"); - // TODO(clean): the winit docs mention using `spawn` instead of `run` on WASM. + // TODO(clean): the winit docs mention using `spawn` instead of `run` on Wasm. if let Err(err) = event_loop.run_app(&mut runner_state) { error!("winit event loop returned an error: {err}"); } diff --git a/docs-template/EXAMPLE_README.md.tpl b/docs-template/EXAMPLE_README.md.tpl index f173c67445..fd3f7e27c1 100644 --- a/docs-template/EXAMPLE_README.md.tpl +++ b/docs-template/EXAMPLE_README.md.tpl @@ -49,7 +49,7 @@ git checkout v0.4.0 - [iOS](#ios) - [Setup](#setup-1) - [Build & Run](#build--run-1) - - [WASM](#wasm) + - [Wasm](#wasm) - [Setup](#setup-2) - [Build & Run](#build--run-2) - [WebGL2 and WebGPU](#webgl2-and-webgpu) @@ -195,7 +195,7 @@ Example | File | Description --- | --- | --- `ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound -## WASM +## Wasm ### Setup diff --git a/examples/3d/blend_modes.rs b/examples/3d/blend_modes.rs index ee6c2f3b17..521494446c 100644 --- a/examples/3d/blend_modes.rs +++ b/examples/3d/blend_modes.rs @@ -21,7 +21,7 @@ fn main() { .add_systems(Update, example_control_system); // Unfortunately, MSAA and HDR are not supported simultaneously under WebGL. - // Since this example uses HDR, we must disable MSAA for WASM builds, at least + // Since this example uses HDR, we must disable MSAA for Wasm builds, at least // until WebGPU is ready and no longer behind a feature flag in Web browsers. #[cfg(target_arch = "wasm32")] app.insert_resource(Msaa::Off); diff --git a/examples/README.md b/examples/README.md index b19a285283..1203c5ef57 100644 --- a/examples/README.md +++ b/examples/README.md @@ -74,7 +74,7 @@ git checkout v0.4.0 - [iOS](#ios) - [Setup](#setup-1) - [Build & Run](#build--run-1) - - [WASM](#wasm) + - [Wasm](#wasm) - [Setup](#setup-2) - [Build & Run](#build--run-2) - [WebGL2 and WebGPU](#webgl2-and-webgpu) @@ -615,7 +615,7 @@ Example | File | Description --- | --- | --- `ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound -## WASM +## Wasm ### Setup diff --git a/examples/app/headless_renderer.rs b/examples/app/headless_renderer.rs index efc40e1f92..2a882063d9 100644 --- a/examples/app/headless_renderer.rs +++ b/examples/app/headless_renderer.rs @@ -435,8 +435,8 @@ fn receive_image_from_buffer( // buffered and receiving will just pick that up. // // It may also be worth noting that although on native, the usage of asynchronous - // channels is wholly unnecessary, for the sake of portability to WASM - // we'll use async channels that work on both native and WASM. + // channels is wholly unnecessary, for the sake of portability to Wasm + // we'll use async channels that work on both native and Wasm. let (s, r) = crossbeam_channel::bounded(1); diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs index a75eba99ff..e5f18d1bdd 100644 --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -133,7 +133,7 @@ fn save_scene_system(world: &mut World) { // Writing the scene to a new file. Using a task to avoid calling the filesystem APIs in a system // as they are blocking - // This can't work in WASM as there is no filesystem access + // This can't work in Wasm as there is no filesystem access #[cfg(not(target_arch = "wasm32"))] IoTaskPool::get() .spawn(async move { diff --git a/examples/shader/gpu_readback.rs b/examples/shader/gpu_readback.rs index dd9f7ab722..2800c44bc3 100644 --- a/examples/shader/gpu_readback.rs +++ b/examples/shader/gpu_readback.rs @@ -224,8 +224,8 @@ fn map_and_read_buffer( // buffered and receiving will just pick that up. // // It may also be worth noting that although on native, the usage of asynchronous - // channels is wholly unnecessary, for the sake of portability to WASM - // we'll use async channels that work on both native and WASM. + // channels is wholly unnecessary, for the sake of portability to Wasm + // we'll use async channels that work on both native and Wasm. let (s, r) = crossbeam_channel::unbounded::<()>(); diff --git a/examples/wasm/index.html b/examples/wasm/index.html index 1688962669..0057c687e4 100644 --- a/examples/wasm/index.html +++ b/examples/wasm/index.html @@ -18,7 +18,7 @@ background-color: white; } - WASM Example + Wasm Example