diff --git a/lib/c-api/src/wasm_c_api/mod.rs b/lib/c-api/src/wasm_c_api/mod.rs index 8bfe417bbea..890393785cf 100644 --- a/lib/c-api/src/wasm_c_api/mod.rs +++ b/lib/c-api/src/wasm_c_api/mod.rs @@ -230,6 +230,12 @@ pub mod trap; /// cbindgen:ignore pub mod types; +/// This module contains _unstable non-standard_ C API. +/// +/// Use them at your own risks. The API is subject to change or to +/// break without any plan to keep any compatibility :-). +pub mod unstable; + /// Possible runtime values that a WebAssembly module can either /// consume or produce. /// @@ -277,8 +283,6 @@ pub mod version; #[cfg(feature = "wasi")] pub mod wasi; -pub mod wasmer; - /// Wasmer-specific API to transform the WAT format into Wasm bytes. /// /// It is used mostly for testing or for small program purposes. diff --git a/lib/c-api/src/wasm_c_api/unstable/mod.rs b/lib/c-api/src/wasm_c_api/unstable/mod.rs new file mode 100644 index 00000000000..cc57a848e88 --- /dev/null +++ b/lib/c-api/src/wasm_c_api/unstable/mod.rs @@ -0,0 +1 @@ +pub mod module; diff --git a/lib/c-api/src/wasm_c_api/wasmer.rs b/lib/c-api/src/wasm_c_api/unstable/module.rs similarity index 89% rename from lib/c-api/src/wasm_c_api/wasmer.rs rename to lib/c-api/src/wasm_c_api/unstable/module.rs index a767af7a049..6787a83658c 100644 --- a/lib/c-api/src/wasm_c_api/wasmer.rs +++ b/lib/c-api/src/wasm_c_api/unstable/module.rs @@ -1,13 +1,14 @@ -//! Non-standard Wasmer-specific extensions to the Wasm C API. +//! Unstable non-standard Wasmer-specific extensions to the Wasm C API. -use super::module::wasm_module_t; -use super::types::wasm_name_t; +use super::super::module::wasm_module_t; +use super::super::types::wasm_name_t; use std::ptr; use std::str; use std::sync::Arc; -/// Non-standard Wasmer-specific API to get the module's name, -/// otherwise `out->size` is set to `0` and `out->data` to `NULL`. +/// Unstable non-standard Wasmer-specific API to get the module's +/// name, otherwise `out->size` is set to `0` and `out->data` to +/// `NULL`. /// /// # Example /// @@ -72,9 +73,9 @@ pub unsafe extern "C" fn wasm_module_name( *out = name.as_bytes().to_vec().into(); } -/// Non-standard Wasmer-specific API to set the module's name. The -/// function returns `true` if the name has been updated, `false` -/// otherwise. +/// Unstable non-standard Wasmer-specific API to set the module's +/// name. The function returns `true` if the name has been updated, +/// `false` otherwise. /// /// # Example /// diff --git a/lib/c-api/wasmer_wasm.h b/lib/c-api/wasmer_wasm.h index a6ee053e402..d3ae2b7636c 100644 --- a/lib/c-api/wasmer_wasm.h +++ b/lib/c-api/wasmer_wasm.h @@ -338,8 +338,9 @@ void wasm_config_set_compiler(wasm_config_t *config, wasmer_compiler_t compiler) void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine); /** - * Non-standard Wasmer-specific API to get the module's name, - * otherwise `out->size` is set to `0` and `out->data` to `NULL`. + * Unstable non-standard Wasmer-specific API to get the module's + * name, otherwise `out->size` is set to `0` and `out->data` to + * `NULL`. * * # Example * @@ -389,9 +390,9 @@ void wasm_config_set_engine(wasm_config_t *config, wasmer_engine_t engine); void wasm_module_name(const wasm_module_t *module, wasm_name_t *out); /** - * Non-standard Wasmer-specific API to set the module's name. The - * function returns `true` if the name has been updated, `false` - * otherwise. + * Unstable non-standard Wasmer-specific API to set the module's + * name. The function returns `true` if the name has been updated, + * `false` otherwise. * * # Example *