wasm-builder: Make it easier to build a WASM binary (#4177)

Basically combines all the recommended calls into one
`build_using_defaults()` call or `init_with_defaults()` when there are
some custom changes required.
This commit is contained in:
Bastian Köcher authored and GitHub committed 2024-04-22 19:28:27 +00:00
1 parent 3380e21cd9
commit bd9287f766
17 files changed
+64 -86

No files matched your search

+2 -8
View File
@@ -18,16 +18,10 @@
fn main() {
use substrate_wasm_builder::WasmBuilder;
WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.build();
WasmBuilder::build_using_defaults();
WasmBuilder::new()
.with_current_project()
WasmBuilder::init_with_defaults()
.enable_feature("increment-spec-version")
.import_memory()
.set_file_name("wasm_binary_spec_version_incremented.rs")
.build();
}