initial commit

This commit is contained in:
りき萌 2024-08-10 23:10:03 +02:00
commit caec0b8ac9
27 changed files with 4786 additions and 0 deletions

View file

@ -0,0 +1,20 @@
use core::fmt::Write;
use alloc::string::String;
extern "C" {
fn panic(message_len: u32, message: *const u8) -> !;
}
fn panic_impl(info: &core::panic::PanicInfo) -> ! {
let mut message = String::new();
_ = write!(&mut message, "{info}");
unsafe { panic(message.len() as u32, message.as_ptr()) };
}
#[cfg(not(test))]
#[panic_handler]
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
panic_impl(info)
}