Skip to content

Commit

Permalink
Fix common capitalization errors in documentation (#14562)
Browse files Browse the repository at this point in the history
WASM -> Wasm
MacOS -> macOS

Nothing important, just something that annoyed me for a while :)
  • Loading branch information
janhohenheim authored Jul 31, 2024
1 parent bfcb19a commit 6f7c554
Show file tree
Hide file tree
Showing 33 changed files with 51 additions and 51 deletions.
8 changes: 4 additions & 4 deletions .cargo/config_fast_builds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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 <https://github.com/rui314/mold>.
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/install-linux-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion .github/start-wasm-example/tests/wasm_example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down Expand Up @@ -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]]
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
doc-valid-idents = [
"GilRs",
"glTF",
"MacOS",
"macOS",
"NVidia",
"OpenXR",
"sRGB",
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_app/src/panic_handler.rs
Original file line number Diff line number Diff line change
@@ -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`.
//!
Expand All @@ -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.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/io/mod.rs
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl AssetProcessor {
/// Starts the processor in a background thread.
pub fn start(_processor: Res<Self>) {
#[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();
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_diagnostic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_input/src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -75,7 +75,7 @@ pub(crate) struct FlushGuard(SyncCell<tracing_chrome::FlushGuard>);
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/meshlet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const MESHLET_MESH_MATERIAL_SHADER_HANDLE: Handle<Shader> =
/// 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`].
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/render_resource/pipeline_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ pub struct PipelineCache {
waiting_pipelines: HashSet<CachedPipelineId>,
new_pipelines: Mutex<Vec<CachedPipeline>>,
/// 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,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Send> ConditionalSend for T {}
Expand All @@ -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<T: std::future::Future + ConditionalSend> ConditionalSendFuture for T {}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_winit/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ pub fn winit_runner<T: Event>(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}");
}
Expand Down
4 changes: 2 additions & 2 deletions docs-template/EXAMPLE_README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/3d/blend_modes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/app/headless_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion examples/scene/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions examples/shader/gpu_readback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<()>();

Expand Down
2 changes: 1 addition & 1 deletion examples/wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
background-color: white;
}
</style>
<title>WASM Example</title>
<title>Wasm Example</title>
</head>
<script type="module">
import init from './target/wasm_example.js'
Expand Down
4 changes: 2 additions & 2 deletions examples/window/window_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ fn main() {
name: Some("bevy.app".into()),
resolution: (500., 300.).into(),
present_mode: PresentMode::AutoVsync,
// Tells wasm to resize the window according to the available canvas
// Tells Wasm to resize the window according to the available canvas
fit_canvas_to_parent: true,
// Tells wasm not to override default event handling, like F5, Ctrl+R etc.
// Tells Wasm not to override default event handling, like F5, Ctrl+R etc.
prevent_default_event_handling: false,
window_theme: Some(WindowTheme::Dark),
enabled_buttons: bevy::window::EnabledButtons {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

pub use bevy_internal::*;

// WASM does not support dynamic linking.
// Wasm does not support dynamic linking.
#[cfg(all(feature = "dynamic_linking", not(target_family = "wasm")))]
#[allow(unused_imports)]
use bevy_dylib;
Loading

0 comments on commit 6f7c554

Please sign in to comment.