use alloc::ffi::CString;
use core::ffi::c_char; // <-- Add this import
extern "C" {
fn avmnif_log(msg: *const c_char); // <-- Use c_char instead of i8
}
pub fn log_info(msg: &str) {
let cstr = CString::new(msg).expect("log message contained null byte");
unsafe {
avmnif_log(cstr.as_ptr()); // <-- No cast needed now
}
}