mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 22:28:21 +00:00
feat(c-api) Remove the deprecated API.
Until this patch, our C API comes in 2 flavors: `deprecated` and `wasm_c_api`. With the coming 2.x version of Wasmer, we would like to remove the `deprecated` API, and keep the `wasm_c_api` only. This patch removes the `deprecated` API from the `wasmer-c-api` crate. It also cleans up the `Makefile` and the documentation system. Previously, the documentation for the `deprecated` API was relying on Doxygen, which was one new dependency the user had to install. For the `wasm_c_api`, it relies on `rustdoc`, which is way better because all examples are run and tested as part of our test suite. This clean up also removes the need to deal with `system-libffi` both in the crate itself and in the `Makefile`, which was an edge case for macOS on aarch64, and a needle in the foot for some of our users. Finally, the `build.rs` is now simplified because we no longer need to exclude symbols from one header to another. It also means that we only provide the `wasmer_wasm.h` header file now; the `wasmer.h` and `wasmer.hh` headers are removed.
This commit is contained in:
@@ -6,7 +6,7 @@ mod capture_files;
|
||||
|
||||
pub use super::unstable::wasi::wasi_get_unordered_imports;
|
||||
use super::{
|
||||
externals::{wasm_extern_vec_t, wasm_func_t, wasm_memory_t},
|
||||
externals::{wasm_extern_vec_t, wasm_func_t},
|
||||
instance::wasm_instance_t,
|
||||
module::wasm_module_t,
|
||||
store::wasm_store_t,
|
||||
@@ -199,25 +199,6 @@ pub extern "C" fn wasi_env_new(mut config: Box<wasi_config_t>) -> Option<Box<was
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wasi_env_delete(_state: Option<Box<wasi_env_t>>) {}
|
||||
|
||||
/// This function is deprecated. You may safely remove all calls to it and everything
|
||||
/// will continue to work.
|
||||
///
|
||||
/// cbindgen:prefix=DEPRECATED("This function is no longer necessary. You may safely remove all calls to it and everything will continue to work.")
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wasi_env_set_instance(
|
||||
_env: &mut wasi_env_t,
|
||||
_instance: &wasm_instance_t,
|
||||
) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// This function is deprecated. You may safely remove all calls to it and everything
|
||||
/// will continue to work.
|
||||
///
|
||||
/// cbindgen:prefix=DEPRECATED("This function is no longer necessary. You may safely remove all calls to it and everything will continue to work.")
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wasi_env_set_memory(_env: &mut wasi_env_t, _memory: &wasm_memory_t) {}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasi_env_read_stdout(
|
||||
env: &mut wasi_env_t,
|
||||
|
||||
Reference in New Issue
Block a user