Rework the deserialize/deserialize_checked methods for module
deserialization.
* Make deserialize() methods use artifact validation
* Make checked methods unsafe again, because loading executable memory
is inherently unsafe
* Rename methods that skip artifact validation to deserialize_unchecked
Closes#3727
Enable rkyv validation of serialized module artifacts.
Required additions:
* derive the required CheckBytes trait for all types
* Add `_checked` variants of all the deserialization functions
Also enables the `strict` feature of rkyv by default.
This will ensure consistent archive binary layout across architectures
and Rust compiler versions.
* Basic changes for RISC-V support
* RISC-V in compiler LLVM
* RISC-V support in dylib engine
* RISC-V support in universal engine
* Various small fixes
* [RISCV] LLVM-riscv working, with some ignored tests to be worked on later
* Update rustc to 4.65 (1.64 has some issue with riscv64 target)
* Fixed some (new) Linting issues
* Updated Cargo.toml and remove split-debuginfo for Windows build
* Removed profile.dev from Cargo.toml as it cannot be per platform (breaks Windows). split-debug info is now the default value
* Enable Cranelift compiler for RISCV
* Update crates and fixed all the new clippy errors
* Taken review remarks into account
* Removed change from deny.toml, it's not needed anymore
* Added some more comment about llvm abi hack
* Added doc about current state of RISCV support
* Fixed (newer) linter
---------
Co-authored-by: Toru Nayuki <tnayuki@icloud.com>
Introduces a new WasiEnvInit type that should hold all information
required for initializing an instance.
An instance can then be created with WasiEnv::instantiate().
This method takes care of all the required setup steps to properly run a
wasi(X) module.
* Example of allocated artifact
* Better error when Instancing fail because of OS/Arch issue
* Add missing brnach for new error
---------
Co-authored-by: Syrus Akbary <me@syrusakbary.com>