Core/src/lib.rs
2024-02-01 19:02:41 +03:00

36 lines
548 B
Rust

#![no_std]
mod modules;
mod nanolibc;
pub mod allocation;
pub mod dll;
pub mod sys;
pub use modules::*;
#[macro_use]
extern crate alloc;
#[macro_export]
macro_rules! throw_new {
($text:expr) => {
debug_write(&format!(
"{}:{}\nAn error raised:\n{}\n",
file!(),
line!(),
$text
));
};
}
#[macro_export]
macro_rules! panic {
($text:expr) => {
debug_write(cstr_core::cstr!("Panic!\n" + $text + "\n"));
unsafe {
sys::exit();
}
};
}