more things

This commit is contained in:
nora 2023-09-30 12:00:05 +02:00
parent 1baf8df4a8
commit 5673cf51db
18 changed files with 292 additions and 9 deletions

14
rawc/src/stdlib.rs Normal file
View file

@ -0,0 +1,14 @@
#[no_mangle]
pub unsafe extern "C" fn malloc(size: usize) -> *mut u8 {
libuwuc::alloc::malloc_zeroed(size, 16)
}
#[no_mangle]
pub unsafe extern "C" fn free(ptr: *mut u8) {
libuwuc::alloc::free(ptr)
}
#[no_mangle]
pub unsafe extern "C" fn exit(code: i32) -> ! {
libuwuc::start::exit(code as i64 as _)
}