mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 13:48:00 +00:00
Respect cargo offline env variable in wasm builder (#11735)
* Support offline env variable in wasm builder * Clean up * Improve checks Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update crate docs * Add docs to `lib.rs` and introduce helper method `offline_build` Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -87,6 +87,8 @@
|
||||
//! required as we walk up from the target directory until we find a `Cargo.toml`. If the target
|
||||
//! directory is changed for the build, this environment variable can be used to point to the
|
||||
//! actual workspace.
|
||||
//! - `CARGO_NET_OFFLINE` - If `true`, `--offline` will be passed to all processes launched to
|
||||
//! prevent network access. Useful in offline environments.
|
||||
//!
|
||||
//! Each project can be skipped individually by using the environment variable
|
||||
//! `SKIP_PROJECT_NAME_WASM_BUILD`. Where `PROJECT_NAME` needs to be replaced by the name of the
|
||||
@@ -119,6 +121,9 @@ pub use builder::{WasmBuilder, WasmBuilderSelectProject};
|
||||
/// Environment variable that tells us to skip building the wasm binary.
|
||||
const SKIP_BUILD_ENV: &str = "SKIP_WASM_BUILD";
|
||||
|
||||
/// Environment variable that tells us whether we should avoid network requests
|
||||
const OFFLINE: &str = "CARGO_NET_OFFLINE";
|
||||
|
||||
/// Environment variable to force a certain build type when building the wasm binary.
|
||||
/// Expects "debug", "release" or "production" as value.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user