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>
1084: Prepare for 0.12.0 release r=MarkMcCaskey a=MarkMcCaskey
# Review
- [x] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Mark McCaskey <mark@wasmer.io>
1075: Add include guards for WASI APIs in runtime-c-api r=syrusakbary a=MarkMcCaskey
Improves correctness, but the readability does suffer.
In the future we should probably have separate header files or find a way to merge the conditional includes
Co-authored-by: Mark McCaskey <mark@wasmer.io>