Skip to content
Snippets Groups Projects
Commit 380cf822 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Rename `TRIGGER_WASM_BUILD` to `FORCE_WASM_BUILD` (#7080)

Because apparently I can not speak properly ;)
parent 91c02134
No related merge requests found
...@@ -318,9 +318,9 @@ we support multiple environment variables: ...@@ -318,9 +318,9 @@ we support multiple environment variables:
for `cargo check` runs. for `cargo check` runs.
* `WASM_BUILD_TYPE` - Sets the build type for building WASM binaries. Supported values are `release` or `debug`. * `WASM_BUILD_TYPE` - Sets the build type for building WASM binaries. Supported values are `release` or `debug`.
By default the build type is equal to the build type used by the main build. By default the build type is equal to the build type used by the main build.
* `TRIGGER_WASM_BUILD` - Can be set to trigger a WASM build. On subsequent calls the value of the variable * `FORCE_WASM_BUILD` - Can be set to force a WASM build. On subsequent calls the value of the variable
needs to change. As WASM builder instructs `cargo` to watch for file changes needs to change. As WASM builder instructs `cargo` to watch for file changes
this environment variable should only be required in certain circumstances. this environment variable should only be required in certain circumstances.
* `WASM_TARGET_DIRECTORY` - Will copy release build WASM binary to the given directory. The path needs * `WASM_TARGET_DIRECTORY` - Will copy release build WASM binary to the given directory. The path needs
to be absolute. to be absolute.
* `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary. * `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary.
......
...@@ -44,7 +44,7 @@ const SKIP_BUILD_ENV: &str = "SKIP_WASM_BUILD"; ...@@ -44,7 +44,7 @@ const SKIP_BUILD_ENV: &str = "SKIP_WASM_BUILD";
const DUMMY_WASM_BINARY_ENV: &str = "BUILD_DUMMY_WASM_BINARY"; const DUMMY_WASM_BINARY_ENV: &str = "BUILD_DUMMY_WASM_BINARY";
/// Environment variable that makes sure the WASM build is triggered. /// Environment variable that makes sure the WASM build is triggered.
const TRIGGER_WASM_BUILD_ENV: &str = "TRIGGER_WASM_BUILD"; const FORCE_WASM_BUILD_ENV: &str = "FORCE_WASM_BUILD";
/// Replace all backslashes with slashes. /// Replace all backslashes with slashes.
fn replace_back_slashes<T: ToString>(path: T) -> String { fn replace_back_slashes<T: ToString>(path: T) -> String {
...@@ -476,6 +476,6 @@ fn generate_rerun_if_changed_instructions() { ...@@ -476,6 +476,6 @@ fn generate_rerun_if_changed_instructions() {
// Make sure that the `build.rs` is called again if one of the following env variables changes. // Make sure that the `build.rs` is called again if one of the following env variables changes.
println!("cargo:rerun-if-env-changed={}", SKIP_BUILD_ENV); println!("cargo:rerun-if-env-changed={}", SKIP_BUILD_ENV);
println!("cargo:rerun-if-env-changed={}", DUMMY_WASM_BINARY_ENV); println!("cargo:rerun-if-env-changed={}", DUMMY_WASM_BINARY_ENV);
println!("cargo:rerun-if-env-changed={}", TRIGGER_WASM_BUILD_ENV); println!("cargo:rerun-if-env-changed={}", FORCE_WASM_BUILD_ENV);
println!("cargo:rerun-if-env-changed={}", generate_crate_skip_build_env_name()); println!("cargo:rerun-if-env-changed={}", generate_crate_skip_build_env_name());
} }
...@@ -51,9 +51,9 @@ By using environment variables, you can configure which Wasm binaries are built ...@@ -51,9 +51,9 @@ By using environment variables, you can configure which Wasm binaries are built
for `cargo check` runs. for `cargo check` runs.
- `WASM_BUILD_TYPE` - Sets the build type for building wasm binaries. Supported values are `release` or `debug`. - `WASM_BUILD_TYPE` - Sets the build type for building wasm binaries. Supported values are `release` or `debug`.
By default the build type is equal to the build type used by the main build. By default the build type is equal to the build type used by the main build.
- `TRIGGER_WASM_BUILD` - Can be set to trigger a wasm build. On subsequent calls the value of the variable - `FORCE_WASM_BUILD` - Can be set to force a wasm build. On subsequent calls the value of the variable
needs to change. As wasm builder instructs `cargo` to watch for file changes needs to change. As wasm builder instructs `cargo` to watch for file changes
this environment variable should only be required in certain circumstances. this environment variable should only be required in certain circumstances.
- `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary. - `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary.
- `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build. - `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build.
- `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs - `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
//! for `cargo check` runs. //! for `cargo check` runs.
//! - `WASM_BUILD_TYPE` - Sets the build type for building wasm binaries. Supported values are `release` or `debug`. //! - `WASM_BUILD_TYPE` - Sets the build type for building wasm binaries. Supported values are `release` or `debug`.
//! By default the build type is equal to the build type used by the main build. //! By default the build type is equal to the build type used by the main build.
//! - `TRIGGER_WASM_BUILD` - Can be set to trigger a wasm build. On subsequent calls the value of the variable //! - `FORCE_WASM_BUILD` - Can be set to force a wasm build. On subsequent calls the value of the variable
//! needs to change. As wasm builder instructs `cargo` to watch for file changes //! needs to change. As wasm builder instructs `cargo` to watch for file changes
//! this environment variable should only be required in certain circumstances. //! this environment variable should only be required in certain circumstances.
//! - `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary. //! - `WASM_BUILD_RUSTFLAGS` - Extend `RUSTFLAGS` given to `cargo build` while building the wasm binary.
//! - `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build. //! - `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build.
//! - `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs //! - `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment