for debugging exportable functions
(bytes: &[u8])
| 51 | |
| 52 | // for debugging exportable functions |
| 53 | fn contract_functions(bytes: &[u8]) -> Vec<String> { |
| 54 | let mut config = Config::new(); |
| 55 | let mut exports = vec![]; |
| 56 | |
| 57 | Config::wasm_component_model(&mut config, true); |
| 58 | |
| 59 | if let Ok(engine) = Engine::new(&config) { |
| 60 | exports = wasmtime::Module::from_binary(&engine, bytes) |
| 61 | .unwrap() |
| 62 | .exports() |
| 63 | .map(|export| export.name().to_string()) |
| 64 | .collect(); |
| 65 | } |
| 66 | |
| 67 | exports |
| 68 | } |
| 69 | |
| 70 | #[cfg(test)] |
| 71 | mod tests { |
no outgoing calls
no test coverage detected