bobcat-console 0.6.5

bobcat-sdk console makes printing easy with Arbitrum Stylus, using a macro.
Documentation
#![no_std]

extern crate alloc;

#[link(wasm_import_module = "console")]
unsafe extern "C" {
    pub fn log_txt(ptr: *const u8, len: usize);
}

#[macro_export]
macro_rules! console {
    ($val:expr) => {
    {
        let tmp = $val;
        let msg = alloc::format!("[{}:{}] {} = {:#?}\n", file!(), line!(), stringify!($val), &tmp);
        unsafe { $crate::log_txt(msg.as_ptr(), msg.len()) };
        tmp
    }};
    ($($vals:expr),+ $(,)?) => {
    {
        let tup = ($($vals),+);
        let msg = alloc::format!("[{}:{}] {} = {:#?}\n", file!(), line!(), stringify!(($($vals),+)), &tup);
        unsafe { $crate::log_txt(msg.as_ptr(), msg.len()) };
        tup
    }};
}