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:
Sebastian Kunert
2022-06-22 17:27:46 +02:00
committed by GitHub
parent acc8cf6e4c
commit 10e966e643
3 changed files with 31 additions and 7 deletions
+1
View File
@@ -64,6 +64,7 @@ By using environment variables, you can configure which Wasm binaries are built
to be absolute.
- `WASM_BUILD_TOOLCHAIN` - The toolchain that should be used to build the Wasm binaries. The
format needs to be the same as used by cargo, e.g. `nightly-2020-02-20`.
- `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 cargo project, e.g. `node-runtime` will