pwasm-std 0.3.1

Parity WebAssembly standard library for contract development
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Logger extensions for pwasm-std

mod external {
	#[cfg_attr(not(feature="std"), link(name = "env"))]
	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); }
}