web3api_wasm_rs/
debug_log.rs

1#[link(wasm_import_module = "w3")]
2extern "C" {
3    /// Get Abort Arguments
4    #[link_name = "__w3_debug_log"]
5    pub fn __w3_debug_log(ptr: u32, len: u32);
6}
7
8pub fn w3_debug_log(msg: &str) {
9    let msg_bytes = msg.as_bytes();
10    unsafe { __w3_debug_log(msg_bytes.as_ptr() as u32, msg_bytes.len() as u32) };
11}