1128: fix(runtime-core) Avoid crashing when missing host functions are allowed r=Hywan a=Hywan
Fix#1118. #1121 can be merged after
This PR fixes 2 things:
* When droping the import backing, check that `vm::FuncCtx` isn't null before dropping it,
* Use an `always_trap` as a placeholder host function when a host function is missing.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
1130: Add WindowClosed event to experimental fb r=MarkMcCaskey a=MarkMcCaskey
Allows things to behave properly and know when the window closes
Co-authored-by: Mark McCaskey <mark@wasmer.io>
Clang can emulate GNUC or MSVC behaviors. So instead of detecting
whether Clang is used to compile the code, it's better to detect the
targeted features are available.
Code proposed by @nlewycky, thanks!
This PR defines a cross-compiler `DEPRECATED(message)` macro. It must
be used as follows in Rust:
```rust
/// This is a documentation.
/// cbindgen:prefix=DEPRECATED(This is a deprecation message.")
pub extern "C" fn wasmer_foo() -> c_uint {
42
}
```
It will generate the following C header:
```c
/**
* This is a documentation.
*/
DEPRECATED("This is a deprecation message.")
unsigned int wasmer_foo();
```
And once this code is used by a C compiler, it will print something
like this (example from Clang):
```
…/test.c:…:…: error: 'wasmer_foo' is deprecated: This is a deprecation message. [-Werror,-Wdeprecated-declarations]
unsigned int x = wasmer_foo();
^
…/wasmer.h:…:…: note: 'wasmer_foo' has been explicitly marked deprecated here
DEPRECATED("This is a deprecation message.")
^
…/wasmer.h:…:…: note: expanded from macro 'DEPRECATED'
```
This is required for further deprecations.
Ran into a few crates in this repo with our license scanner that didn't have any license attached to them.
Added MIT to be consistent with the other crates. Please adjust if not correct.
1095: Update to cranelift 0.52 r=nlewycky a=nlewycky
# Description
Update to cranelift 0.52.
To use our wasmer branch of cranelift, we point to its path on git. Per @syrusakbary , we don't want to push updated wasmer-clif crates until we're ready to release the matching wasmer that will use them.
# Review
- [x] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Mark McCaskey <mark@wasmer.io>