* Add test from original bug report
Original is from @pepyakin in 3d7b27f3421818e8d6de568e02fbc2947a06246b.
I adapted it to work with the latest master.
* No longer cleanup module instance
* Replace runtime cache with synchronous clone
* Fix test
* Preserve initial runtime memory and restore it on fetch
* Remove leftover comment
* Fix style
* Improve variable naming
* Replace get_into() with get()
* Handle missing memory export better
* Return earlier when creating runtime first time
* Improve comments
* fmt
* Fix#2967.
* Eradicate `code` from `Error::InvalidCode`
* tidy
* A state snapshot doc.
* Store multiple runtimes by hash.
* Get rid of deref.
* Docs
* Use Self for instantiate_module
* REVERT ME
* Should be ok
* Commit
* Remove dbg
* Use fast-memory's erase
* Clean and undo hacks.
* Introduce a dedicated error for heap_base
* Ban the start function.
* Clean, docs and refactor
* Add rustflags.
* Update Cargo.lock
* Apply Basti's suggestions
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Rename allocates_huge_stack_array
* Extend TestClientBuilder with set_heap_pages
* Update the test.
* Update core/executor/src/wasm_executor.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/wasm_runtimes_cache.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/error.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/error.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix tests.
* Update cargo-lock
* Use wasmi master
* Use master wasmi
* Move tests.
* Use wasmi crates.io
* Update Cargo.lock
* Fix build.rs
* Bump runtime version
* Revert initial_heap_pages renaming
* Bump wasmi up to 0.5.0
* Bump runtime version
* Don't restore an instance every now and then
* Update core/executor/src/wasm_runtimes_cache.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Propagate error in CacheError
* Clarify the get_heap_base call in instantiation
* Supply --export=__heap_base
See https://reviews.llvm.org/D62744
Co-authored-by: Jim Posen <jim.posen@gmail.com>
* Bump version.
* Use combinators for segments.
* Fix build.rs
* Fix build.rs for runtime-test
* End build when `wasm-builder` does not find a prerequisite
Using `compile_error!` was a stupid idea by me, as rust would not
re-execute the build.rs.
* Increment the `wasm-builder` version
* Update core/utils/wasm-builder/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
Make use of `wasm-builder` in `test-runtime`.
* Add build script and remove the wasm project
* Port `node-runtime` to new wasm-builder
* Make `substrate-executor` tests work with `wasm-builder`
* Move `node-template` to `wasm-builder`
* Remove `build.sh` :)
* Remove the last include_bytes
* Adds the missing build.rs files
* Remove `build.sh` from CI
* Debug CI
* Make it work in CI
* CI attempt 3
* Make `substrate-runtime-test` compile on stable
* Ahhh, some missed `include_bytes!`
* AHH
* Add suggestions
* Improve search for `Cargo.lock` and don't panic if it is not found
* Searching from manifest path was no good idea
* Make the `wasm-builder` source better configurable
* Expose the bloaty wasm binary as well
* Make sure to rerun WASM recompilation on changes in dependencies
* Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
changes to env variables
* Remove `build.sh` from READMEs
* Rename the projects
* Fixes CI
* Update lock file
* Fixes merge-conflict
* Apply suggestions from code review
Co-Authored-By: TriplEight <denis.pisarev@parity.io>
* Try to make windows happy
* Replace all back slashes in paths with slashes
* Apply suggestions from code review
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Use cargo from `CARGO` env variable
* Fix compilation
* Use `rustup` for running the nightly build
* Make individual projects skipable
* Fix compilation
* Fixes compilation
* Build all WASM projects in one workspace
* Replace more back slashes!
* Remove `inlcude_bytes!`
* Adds some documentation
* Apply suggestions from code review
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
* More review comments
* Update `Cargo.lock`
* Set license
* Apply suggestions from code review
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* More review comments + adds `TRIGGER_WASM_BUILD` env
* Fix doc tests
* Increase version + update README
* Switch crates.io version of `wasm-builder`
* Update README
* Switch to released version of `wasm-builder-runner`