Merge branch 'master' into feat-c-api-cross-compilation-2

This commit is contained in:
Ivan Enderlin
2021-02-02 11:07:21 +01:00
4 changed files with 99 additions and 652 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(