Bump Rust version to nightly-2025-02-18(2024 Edition)

This commit is contained in:
Yifan Wu 2025-02-19 21:27:17 +08:00
parent 123595601d
commit 5b846fce6a
44 changed files with 118 additions and 105 deletions

View file

@ -23,7 +23,6 @@
#![allow(unused_imports)]
#![no_std]
#![no_main]
#![feature(panic_info_message)]
#![feature(alloc_error_handler)]
extern crate alloc;
@ -56,9 +55,9 @@ use core::arch::global_asm;
global_asm!(include_str!("entry.asm"));
/// clear BSS segment
fn clear_bss() {
extern "C" {
fn sbss();
fn ebss();
unsafe extern "C" {
safe fn sbss();
safe fn ebss();
}
unsafe {
core::slice::from_raw_parts_mut(sbss as usize as *mut u8, ebss as usize - sbss as usize)
@ -66,8 +65,8 @@ fn clear_bss() {
}
}
#[no_mangle]
/// the rust entry-point of os
#[unsafe(no_mangle)]
pub fn rust_main() -> ! {
clear_bss();
logging::init();