tinymist_vfs/
utils.rs

1#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
2#[allow(unused_macros)]
3macro_rules! console_log {
4    ($($arg:tt)*) => {
5        #[cfg(feature = "web")]
6        web_sys::console::info_1(&format!(
7            $($arg)*
8        ).into());
9    }
10}
11
12#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
13#[allow(unused_macros)]
14macro_rules! console_log {
15    ($($arg:tt)*) => {
16        eprintln!(
17            $($arg)*
18        );
19    }
20}
21
22#[allow(unused_imports)]
23pub(crate) use console_log;