The new rule is the following:
* `wasm_` for the standard C API,
* `wasmer_` or `wasi_` for the Wasmer non-standard C API.
For all symbols inside the `unstable` module, the renaming `wasm_` to
`wasmer_` is done without deprecations. It was clear that those API
were unstable.
For all the other symbols, symbols have been renamed to `wasmer_` but
the old symbols have been kept with deprecation warnings.
Special note: The `wasm_named_extern_t` type (and associated
functions) was in `wasi` by mistake. Its place was in the `unstable`
module. This patch also fixes that.
The `wasm_declare_vec_*` macros have been updated to support a default
prefix, or a user-defined prefix. It's now possible to write
`wasm_declare_boxed_vec!(foo);` to get all the API prefixed by `wasm_`
(as previously), or `wasm_declare_boxed_vec!(foo, wasmer);` to prefix
with `wasmer_`.
A user not using symbols from the `unstable` module will continue to
get working code, modulo some deprecations, after this patch.
The `wasm_trap_t**` argument of `wasm_instance_new` represents an
output pointer to a `wasm_trap_t*`, not an array of
`wasm_trap_t*`. This patch updates the code accordingly.
When running `Instance::new`, it can error with an
`InstantiationError`. There is 2 scenarii:
1. Either it's a `InstantiationError::Link`. In this case, the
`wasm_instance_new` function must return `NULL` and register the
error in the Wasmer error registry.
2. Either it's a `InstantiationError::Start`. In this case, the
`wasm_instance_new` function must return `NULL` and the error must be
converted into a `wasm_trap_t`, which is stored in the `wasm_trap_t**`
array. This array is initialized by `wasm_instance_new` itself.
`wasm_store_t` is now a proper struct (rather than an opaque type) of
kind:
```rs
struct wasm_store_t {
inner: Store
}
```
The rest of the patch updates the code accordingly.