2083: doc(c-api) Remove inline documentation in `wasmer_wasm.h`, clarification about stability… r=Hywan a=Hywan

# Description

As suggested in https://github.com/wasmerio/wasmer/pull/2053#discussion_r566692725, this PR removes the automatically generated documentation when building `wasmer_wasm.h`.

It also clarifies our position regarding stability, and add a section about the documentation.

This PR takes also the opportunity to mark `wasi_env_set_(instance|memory)` as deprecated functions.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Ivan Enderlin <ivan@mnt.io>
This commit is contained in:
bors[bot]
2021-02-02 09:24:37 +00:00
committed by GitHub
4 changed files with 99 additions and 432 deletions

View File

@@ -199,30 +199,22 @@ 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.
// Dead code: deprecate or remove
#[allow(unused_variables)]
///
/// 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 {
/*
let memory = if let Ok(memory) = instance.inner.exports.get_memory("memory") {
memory
} else {
return false;
};
env.inner.set_memory(memory.clone());
*/
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.
// Dead code: deprecate or remove
#[allow(unused_variables)]
///
/// 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) {
//env.inner.set_memory(memory.inner.clone());
}
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(