Skip to main content

bobcat_alloc/
lib.rs

1#![no_std]
2
3#[cfg(all(target_family = "wasm", target_os = "unknown"))]
4pub use mini_alloc::MiniAlloc as Alloc;
5
6#[macro_export]
7macro_rules! bobcat_allocator {
8    () => {
9        #[cfg(any(
10            all(target_family = "wasm", target_os = "unknown"),
11            all(target_arch = "riscv32", target_os = "none")
12        ))]
13        #[global_allocator]
14        static ALLOC: $crate::Alloc = $crate::Alloc;
15        extern crate alloc;
16    };
17}