Core/src/lib.rs

32 lines
503 B
Rust
Raw Normal View History

2021-09-10 16:32:09 +02:00
#![no_std]
2024-01-12 09:39:38 +01:00
mod modules;
2021-12-09 12:32:45 +01:00
mod nanolibc;
pub mod sys;
2021-12-09 00:18:30 +01:00
pub mod allocation;
2024-01-12 09:39:38 +01:00
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"));
sys::exit();
};
}