This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Build WASM binaries as part of cargo build #2868
Merged
Merged
Changes from 11 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1ed68f2
Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
bkchr 96b1fb6
Add build script and remove the wasm project
bkchr 47dd047
Port `node-runtime` to new wasm-builder
bkchr 468bbee
Make `substrate-executor` tests work with `wasm-builder`
bkchr 3e6108f
Move `node-template` to `wasm-builder`
bkchr cdd2619
Remove `build.sh` :)
bkchr fb80a34
Remove the last include_bytes
bkchr 8a61c2f
Adds the missing build.rs files
bkchr f4ceedc
Remove `build.sh` from CI
bkchr c9e4094
Debug CI
bkchr 4269b6f
Make it work in CI
bkchr 98c3dad
CI attempt 3
bkchr 3140240
Make `substrate-runtime-test` compile on stable
bkchr ee690d4
Ahhh, some missed `include_bytes!`
bkchr cd62ba8
AHH
bkchr 4daabf1
Add suggestions
bkchr 1b334b2
Improve search for `Cargo.lock` and don't panic if it is not found
bkchr 22273d8
Merge branch 'master' into bkchr-wasm-builder
bkchr 30960db
Searching from manifest path was no good idea
bkchr b54231d
Make the `wasm-builder` source better configurable
bkchr d522b5c
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr 320ce2d
Expose the bloaty wasm binary as well
bkchr 3a8c627
Make sure to rerun WASM recompilation on changes in dependencies
bkchr 5e17414
Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
bkchr 54e07da
Remove `build.sh` from READMEs
bkchr 416e5e5
Rename the projects
bkchr 2ffc83a
Fixes CI
bkchr cef2a99
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr 5dfd5d6
Update lock file
bkchr 04aca22
Fixes merge-conflict
bkchr ed434f5
Apply suggestions from code review
bkchr 420f5d9
Try to make windows happy
bkchr c6a4dbb
Replace all back slashes in paths with slashes
bkchr a2e471e
Apply suggestions from code review
bkchr 434ee08
Use cargo from `CARGO` env variable
bkchr 1dd2803
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr fd2da24
Fix compilation
bkchr f0c2746
Use `rustup` for running the nightly build
bkchr c150290
Make individual projects skipable
bkchr 58db3fc
Fix compilation
bkchr 3bb8192
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr 8143a18
Fixes compilation
bkchr 3cd7239
Build all WASM projects in one workspace
bkchr a83e575
Replace more back slashes!
bkchr 6343b8e
Remove `inlcude_bytes!`
bkchr efb977b
Adds some documentation
bkchr e34b0fc
Apply suggestions from code review
bkchr 36e6d97
Apply suggestions from code review
bkchr c5804bb
More review comments
bkchr 4d22d0e
Merge remote-tracking branch 'origin/master' into bkchr-wasm-builder
bkchr 3007382
Update `Cargo.lock`
bkchr 51660ab
Set license
bkchr c7674da
Apply suggestions from code review
bkchr c2f5580
Merge branch 'bkchr-wasm-builder' of github.com:paritytech/substrate …
bkchr ca8ff6f
More review comments + adds `TRIGGER_WASM_BUILD` env
bkchr b38fe79
Fix doc tests
bkchr b4c7b54
Increase version + update README
bkchr 4427ebe
Switch crates.io version of `wasm-builder`
bkchr 61b5c7a
Update README
bkchr 890d420
Switch to released version of `wasm-builder-runner`
bkchr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <[email protected]>"] | |
| edition = "2018" | ||
|
|
||
| [dependencies] | ||
| derive_more = "0.14.0" | ||
| derive_more = "0.15.0" | ||
| parity-codec = "3.3" | ||
| runtime_io = { package = "sr-io", path = "../sr-io" } | ||
| primitives = { package = "substrate-primitives", path = "../primitives" } | ||
|
|
@@ -15,8 +15,8 @@ state_machine = { package = "substrate-state-machine", path = "../state-machine" | |
| runtime_version = { package = "sr-version", path = "../sr-version" } | ||
| panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" } | ||
| wasmi = { version = "0.4.3" } | ||
| byteorder = "1.1" | ||
| lazy_static = "1.0" | ||
| byteorder = "1.3" | ||
| lazy_static = "1.3" | ||
| parking_lot = "0.8.0" | ||
| log = "0.4" | ||
| libsecp256k1 = "0.2.1" | ||
|
|
@@ -26,6 +26,7 @@ tiny-keccak = "1.4.2" | |
| assert_matches = "1.1" | ||
| wabt = "~0.7.4" | ||
| hex-literal = "0.2.0" | ||
| runtime-test = { package = "substrate-runtime-test", path = "runtime-test" } | ||
|
|
||
| [features] | ||
| default = [] | ||
|
|
||
17 changes: 8 additions & 9 deletions
17
core/executor/wasm/Cargo.toml → core/executor/runtime-test/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,19 @@ | ||
| [package] | ||
| name = "runtime-test" | ||
| name = "substrate-runtime-test" | ||
| version = "2.0.0" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2018" | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib"] | ||
| build = "build.rs" | ||
|
|
||
| [dependencies] | ||
| runtime_io = { package = "sr-io", path = "../../sr-io", default-features = false } | ||
| sandbox = { package = "sr-sandbox", path = "../../sr-sandbox", default-features = false } | ||
| substrate-primitives = { path = "../../primitives", default-features = false } | ||
|
|
||
| [profile.release] | ||
| panic = "abort" | ||
| lto = true | ||
| [build-dependencies] | ||
| wasm-builder-runner = { path = "../../utils/wasm-builder-runner" } | ||
|
|
||
| [workspace] | ||
| members = [] | ||
| [features] | ||
| default = [ "std" ] | ||
| std = [] | ||
| no_std = [] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
core/executor/wasm/src/lib.rs → core/executor/runtime-test/src/lib.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.