mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Remove the no_std feature from the WASM builder (#3640)
* Remove the no_std feature from the WASM builder * Address review * More fixing * Address review again * Fix missing Cargo.lock
This commit is contained in:
committed by
Bastian Köcher
parent
49ad0dbdff
commit
9ea3d8fc52
@@ -18,4 +18,3 @@ wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
std = []
|
||||
no_std = []
|
||||
|
||||
@@ -21,7 +21,7 @@ fn main() {
|
||||
"wasm_binary.rs",
|
||||
WasmBuilderSource::CratesOrPath {
|
||||
path: "../../utils/wasm-builder",
|
||||
version: "1.0.6",
|
||||
version: "1.0.7",
|
||||
},
|
||||
// This instructs LLD to export __heap_base as a global variable, which is used by the
|
||||
// external memory allocator.
|
||||
|
||||
@@ -44,7 +44,6 @@ wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.
|
||||
default = [
|
||||
"std",
|
||||
]
|
||||
no_std = []
|
||||
std = [
|
||||
"log",
|
||||
"serde",
|
||||
|
||||
@@ -21,7 +21,7 @@ fn main() {
|
||||
"wasm_binary.rs",
|
||||
WasmBuilderSource::CratesOrPath {
|
||||
path: "../utils/wasm-builder",
|
||||
version: "1.0.6",
|
||||
version: "1.0.7",
|
||||
},
|
||||
// Note that we set the stack-size to 1MB explicitly even though it is set
|
||||
// to this value by default. This is because some of our tests (`restoration_of_globals`)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "substrate-wasm-builder"
|
||||
version = "1.0.6"
|
||||
version = "1.0.7"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Utility for building WASM binaries"
|
||||
edition = "2018"
|
||||
|
||||
@@ -9,7 +9,6 @@ A project that should be compiled as a WASM binary needs to:
|
||||
|
||||
1. Add a `build.rs` file.
|
||||
2. Add `substrate-wasm-builder-runner` as dependency into `build-dependencies`.
|
||||
3. Add a feature called `no-std`.
|
||||
|
||||
The `build.rs` file needs to contain the following code:
|
||||
|
||||
@@ -26,8 +25,6 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
The `no-std` feature will be enabled by WASM builder while compiling your project to WASM.
|
||||
|
||||
As the final step, you need to add the following to your project:
|
||||
|
||||
```rust
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
//!
|
||||
//! 1. Add a `build.rs` file.
|
||||
//! 2. Add `substrate-wasm-builder-runner` as dependency into `build-dependencies`.
|
||||
//! 3. Add a feature called `no-std`.
|
||||
//!
|
||||
//! The `build.rs` file needs to contain the following code:
|
||||
//!
|
||||
@@ -42,8 +41,6 @@
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! The `no-std` feature will be enabled by WASM builder while compiling your project to WASM.
|
||||
//!
|
||||
//! As the final step, you need to add the following to your project:
|
||||
//!
|
||||
//! ```ignore
|
||||
|
||||
@@ -270,7 +270,7 @@ fn create_project(cargo_manifest: &Path, wasm_workspace: &Path) -> PathBuf {
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
wasm_project = {{ package = "{crate_name}", path = "{crate_path}", default-features = false, features = [ "no_std" ] }}
|
||||
wasm_project = {{ package = "{crate_name}", path = "{crate_path}", default-features = false }}
|
||||
"#,
|
||||
crate_name = crate_name,
|
||||
crate_path = crate_path.display(),
|
||||
|
||||
Reference in New Issue
Block a user