wasi2ic 0.2.16

This tool converts WebAssembly System Interface (WASI) dependent Wasm files to be compatible with the Internet Computer (IC) platform.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod common;

/// Rewire WASI functions.
/// If there are no functions found for replacement, the module processing will not happen.
/// This is done to avoid any modification if the ic-wasi-polyfill library was not included in the build.
///
/// returns true if the module was modified
pub fn process_module(m: &mut walrus::Module) -> bool {
    common::do_module_replacements(m)
}

/// Convenience function to get the list of functions imported
///
/// returns pairs of values: (module name, function name)
pub fn module_imports(m: &mut walrus::Module) -> Vec<(String, String)> {
    common::get_module_imports(m)
}