pwasm-std 0.13.1

Parity WebAssembly standard library for contract development
1
2
3
4
5
6
7
8
9
10
11
//! Logger extensions for pwasm-std
mod external {
	extern {
		pub fn debug(str_ptr: *const u8, str_len: u32);
	}
}

/// Log debug message to the runtime
pub fn debug(msg: &str) {
	unsafe { external::debug(msg.as_ptr(), msg.len() as u32); }
}