mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-13 13:58:38 +00:00
chore(c-api) Formalize API prefixes.
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.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
pub mod engine;
|
||||
pub mod module;
|
||||
pub mod target_lexicon;
|
||||
|
||||
#[cfg(feature = "wasi")]
|
||||
pub mod wasi;
|
||||
|
||||
Reference in New Issue
Block a user