Archived
3
0

initial commit

This commit is contained in:
2023-01-15 03:54:38 -05:00
commit 10bf5f4795
7 changed files with 344 additions and 0 deletions

28
src/lib.rs Normal file
View File

@@ -0,0 +1,28 @@
// Copyright (c) 2023 YAC
// SPDX-License-Identifier: FSFAP
/* Copying and distribution of this file, with or without modification, are
* permitted in any medium without royalty provided the copyright notice and
* this notice are preserved. This file is offered as-is, without any warranty.
*/
#![no_std]
#![feature(core_intrinsics, lang_items, start)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
#[lang = "eh_personality"]
#[no_mangle]
fn rust_eh_personality() {}
#[lang = "panic_impl"]
#[no_mangle]
fn panic(_: &core::panic::PanicInfo) -> ! { core::intrinsics::abort() }
#[no_mangle]
pub fn exit(code: u32) -> ! {
unsafe { libc::exit(code as u16 as i16 as libc::c_int) }
}