RustForge

rust-kernel

Rustbelt: a hobby x86_64 kernel written in Rust

authorTyler Fowler <tyler@localhost>2026-10-30 01:25:50 -0700
commit320b50a20c463485b5abd4f9d71b5395b4c27581
parentcd21aabc566c397fcafc3de71454a81b47f7656f
treebrowse files at this commit
Rename the crate rust_kernel -> rustbelt

Package, binary and library are now rustbelt (use rustbelt::...). The image is
target/x86_64-rust_kernel/debug/bootimage-rustbelt.bin; the target spec
x86_64-rust_kernel.json and the directory keep their names.
MCargo.lock+1 -1
MCargo.toml+2 -2
MREADME.md+3 -3
Mscripts/run-headless.sh+2 -2
Mscripts/screenshot.sh+2 -2
Msrc/main.rs+13 -13
Mtests/basic_boot.rs+4 -4
Mtests/block.rs+8 -8
Mtests/executor.rs+7 -7
Mtests/fat.rs+12 -12
Mtests/heap_allocation.rs+6 -6
Mtests/shell.rs+9 -9
Mtests/should_panic.rs+3 -3
Mtests/stack_overflow.rs+5 -5
Mtests/threads.rs+8 -8
Mtests/user_mode.rs+13 -13
Mtests/vfs.rs+8 -8

17 files changed, 106 insertions, 106 deletions

@@ -159,7 +159,7 @@ dependencies = [ ]  [[package]]-name = "rust_kernel"+name = "rustbelt" version = "0.7.0" dependencies = [  "bootloader",
@@ -1,5 +1,5 @@ [package]-name = "rust_kernel"+name = "rustbelt" version = "0.7.0" edition = "2024" @@ -54,7 +54,7 @@ page-fault = [] doctest = false  # doc tests would need std; our tests run in QEMU instead  [[bin]]-name = "rust_kernel"+name = "rustbelt" test = false   # all tests live in the library and tests/ bench = false 
@@ -74,7 +74,7 @@ sudo apt install qemu-system-x86 qemu-system-gui dosfstools mtools fdisk ## Build and run  ```sh-cargo bootimage                     # build -> target/x86_64-rust_kernel/debug/bootimage-rust_kernel.bin+cargo bootimage                     # build -> target/x86_64-rust_kernel/debug/bootimage-rustbelt.bin cargo run                           # build + boot in a QEMU window; serial output also prints in the terminal ``` @@ -293,7 +293,7 @@ heap_allocation::simple_allocation...               [ok] | `tests/threads.rs` | two busy-looping threads that never yield both make progress while the main thread busy-waits too (only possible with preemption); a thread can exit and the others keep running |  How it works: `#![feature(custom_test_frameworks)]` collects every `#[test_case]`-function and passes them to `rust_kernel::test_runner` (in `src/lib.rs`), which+function and passes them to `rustbelt::test_runner` (in `src/lib.rs`), which prints each name to serial, runs it, prints `[ok]`, then exits QEMU with success. A panic goes to `test_panic_handler`, which prints `[failed]` and exits with failure. @@ -1138,7 +1138,7 @@ and for a UEFI/framebuffer setup later, the newer [`bootloader` 0.11](https://gi   kernel ELF with an *old* mtime, so bootimage thinks its cached image is current   and boots the wrong build. `scripts/runner.sh` and the scripts `touch` the ELF   first to avoid this. If you call `cargo bootimage --features ...` by hand after-  switching features, `touch target/x86_64-rust_kernel/debug/rust_kernel` first.+  switching features, `touch target/x86_64-rust_kernel/debug/rustbelt` first. - `build.rs` reruns when `user/`, `disk/` or `build.rs` change and rebuilds   `target/disk.img`. QEMU opens it with `snapshot=on`, so the kernel's writes   (the tests create and delete files) never reach the file on disk.
@@ -14,9 +14,9 @@ cd "$(dirname "$0")/.."  cargo build --features "headless${1:+,$1}" # Force bootimage to repack the disk image (see scripts/runner.sh for why).-touch target/x86_64-rust_kernel/debug/rust_kernel+touch target/x86_64-rust_kernel/debug/rustbelt cargo bootimage --features "headless${1:+,$1}"-IMG=target/x86_64-rust_kernel/debug/bootimage-rust_kernel.bin+IMG=target/x86_64-rust_kernel/debug/bootimage-rustbelt.bin  LOG=target/headless-serial.log set +e
@@ -14,9 +14,9 @@ cd "$(dirname "$0")/.."  cargo build # Force bootimage to repack the disk image (see scripts/runner.sh for why).-touch target/x86_64-rust_kernel/debug/rust_kernel+touch target/x86_64-rust_kernel/debug/rustbelt cargo bootimage-IMG=target/x86_64-rust_kernel/debug/bootimage-rust_kernel.bin+IMG=target/x86_64-rust_kernel/debug/bootimage-rustbelt.bin OUT="${1:-$PWD/boot.png}" SESSION="${2:-}" shift $(( $# > 2 ? 2 : $# ))
@@ -14,13 +14,13 @@ extern crate alloc; // Box, Vec, Rc... once the heap is set up  use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo;-use rust_kernel::task::{Task, executor::Executor, keyboard};-use rust_kernel::{fs, kprintln, println, process, serial_println, thread};+use rustbelt::task::{Task, executor::Executor, keyboard};+use rustbelt::{fs, kprintln, println, process, serial_println, thread}; // Only the demos need these. #[cfg(feature = "demos")] use {     alloc::{boxed::Box, rc::Rc, vec, vec::Vec},-    rust_kernel::{allocator, memory, vga_buffer},+    rustbelt::{allocator, memory, vga_buffer},     x86_64::{VirtAddr, structures::paging::{Page, Translate}}, }; @@ -31,7 +31,7 @@ entry_point!(kernel_main); fn kernel_main(boot_info: &'static BootInfo) -> ! {     kprintln!("Rustbelt {} -- a hobby x86_64 kernel in Rust", env!("CARGO_PKG_VERSION")); -    rust_kernel::init(); // GDT, IDT, PICs, enable interrupts+    rustbelt::init(); // GDT, IDT, PICs, enable interrupts      #[cfg(feature = "demos")]     {@@ -58,7 +58,7 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {     #[cfg(feature = "demos")]     paging_demo(boot_info);     #[cfg(not(feature = "demos"))]-    rust_kernel::init_memory(boot_info);+    rustbelt::init_memory(boot_info);      // --- Preemptive threads demo (thread.rs) --------------------------------     // From now on the timer interrupt switches between threads every tick.@@ -72,7 +72,7 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {      // --- VFS, PCI, disks (fs/, pci.rs, block/) ------------------------------     fs::init();-    let (pci_devices, storage_log) = rust_kernel::init_storage();+    let (pci_devices, storage_log) = rustbelt::init_storage();     for d in &pci_devices {         serial_println!(             "[pci] {:02x}:{:02x}.{} {:04x}:{:04x} {}",@@ -115,7 +115,7 @@ fn shell_supervisor() {     if fs::lookup(SHELL).is_err() {         kprintln!("[kernel] no {} -- was QEMU started with the disk image?", SHELL);         #[cfg(feature = "headless")]-        rust_kernel::exit_qemu(rust_kernel::QemuExitCode::Failed);+        rustbelt::exit_qemu(rustbelt::QemuExitCode::Failed);         return;     }     loop {@@ -128,7 +128,7 @@ fn shell_supervisor() {             Err(e) => {                 kprintln!("[kernel] could not start {}: {:?}", SHELL, e);                 #[cfg(feature = "headless")]-                rust_kernel::exit_qemu(rust_kernel::QemuExitCode::Failed);+                rustbelt::exit_qemu(rustbelt::QemuExitCode::Failed);                 return;             }         };@@ -136,8 +136,8 @@ fn shell_supervisor() {         {             let ok = status == process::ExitStatus::Exited(0);             serial_println!("[{}] shell self-test finished: {:?}", if ok { "ok" } else { "failed" }, status);-            serial_println!("[memory] {} frames in use", rust_kernel::memory::frames_in_use());-            rust_kernel::exit_qemu(if ok { rust_kernel::QemuExitCode::Success } else { rust_kernel::QemuExitCode::Failed });+            serial_println!("[memory] {} frames in use", rustbelt::memory::frames_in_use());+            rustbelt::exit_qemu(if ok { rustbelt::QemuExitCode::Success } else { rustbelt::QemuExitCode::Failed });         }         kprintln!("[kernel] shell exited ({:?}); starting a new one", status);     }@@ -169,7 +169,7 @@ async fn example_task() {     let number = async_number().await;     kprintln!("[async] async number: {}", number);     for i in 1..=3 {-        rust_kernel::task::yield_now().await; // let other tasks run+        rustbelt::task::yield_now().await; // let other tasks run         serial_println!("[async] example task step {} (after yield)", i);     } }@@ -307,6 +307,6 @@ fn panic(info: &PanicInfo) -> ! {     println!("{}", info);     serial_println!("KERNEL PANIC: {}", info);     #[cfg(feature = "headless")]-    rust_kernel::exit_qemu(rust_kernel::QemuExitCode::Failed);-    rust_kernel::hlt_loop();+    rustbelt::exit_qemu(rustbelt::QemuExitCode::Failed);+    rustbelt::hlt_loop(); }
@@ -2,21 +2,21 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  use core::panic::PanicInfo;-use rust_kernel::println;+use rustbelt::println;  #[unsafe(no_mangle)] // a plain `_start`: we don't need BootInfo here pub extern "C" fn _start() -> ! {     test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }  #[test_case]
@@ -3,7 +3,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -11,18 +11,18 @@ extern crate alloc; use alloc::{sync::Arc, vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo;-use rust_kernel::block::{self, BlockDevice, RamDisk, SECTOR_SIZE, partition};-use rust_kernel::errno::Errno;-use rust_kernel::pci;+use rustbelt::block::{self, BlockDevice, RamDisk, SECTOR_SIZE, partition};+use rustbelt::errno::Errno;+use rustbelt::pci;  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();-    rust_kernel::init_memory(boot_info);+    rustbelt::init();+    rustbelt::init_memory(boot_info);     block::init(&pci::scan());     test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[test_case]@@ -129,5 +129,5 @@ fn mbr_partitions_on_a_ram_disk() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -3,7 +3,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -12,22 +12,22 @@ use alloc::{rc::Rc, vec, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::cell::RefCell; use core::panic::PanicInfo;-use rust_kernel::allocator;-use rust_kernel::memory::{self, BootInfoFrameAllocator};-use rust_kernel::task::{Task, executor::Executor, simple_executor::SimpleExecutor, yield_now};+use rustbelt::allocator;+use rustbelt::memory::{self, BootInfoFrameAllocator};+use rustbelt::task::{Task, executor::Executor, simple_executor::SimpleExecutor, yield_now}; use x86_64::VirtAddr;  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();+    rustbelt::init();     let phys_mem_offset = VirtAddr::new(boot_info.physical_memory_offset);     let mut mapper = unsafe { memory::init(phys_mem_offset) };     let mut frame_allocator = unsafe { BootInfoFrameAllocator::init(&boot_info.memory_map) };     allocator::init_heap(&mut mapper, &mut frame_allocator).expect("heap initialization failed");      test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  async fn add_one(x: u32) -> u32 {@@ -69,5 +69,5 @@ fn executor_interleaves_yielding_tasks() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -3,7 +3,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -12,22 +12,22 @@ use alloc::{string::String, sync::Arc, vec, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo; use fatfs::{Read, Seek, SeekFrom, Write};-use rust_kernel::block::{BlockDevice, RamDisk, SECTOR_SIZE};-use rust_kernel::errno::Errno;-use rust_kernel::fs::fat::BlockIo;-use rust_kernel::fs::file::{File, InodeFile};-use rust_kernel::fs::{self, InodeKind};-use rust_kernel::elf;+use rustbelt::block::{BlockDevice, RamDisk, SECTOR_SIZE};+use rustbelt::errno::Errno;+use rustbelt::fs::fat::BlockIo;+use rustbelt::fs::file::{File, InodeFile};+use rustbelt::fs::{self, InodeKind};+use rustbelt::elf;  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();-    rust_kernel::init_memory(boot_info);+    rustbelt::init();+    rustbelt::init_memory(boot_info);     fs::init();-    rust_kernel::init_storage();+    rustbelt::init_storage();     test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[test_case]@@ -127,5 +127,5 @@ fn block_io_adapter_handles_unaligned_access() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -2,7 +2,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -10,21 +10,21 @@ extern crate alloc; use alloc::{boxed::Box, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo;-use rust_kernel::allocator::{self, HEAP_SIZE};-use rust_kernel::memory::{self, BootInfoFrameAllocator};+use rustbelt::allocator::{self, HEAP_SIZE};+use rustbelt::memory::{self, BootInfoFrameAllocator}; use x86_64::VirtAddr;  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();+    rustbelt::init();     let phys_mem_offset = VirtAddr::new(boot_info.physical_memory_offset);     let mut mapper = unsafe { memory::init(phys_mem_offset) };     let mut frame_allocator = unsafe { BootInfoFrameAllocator::init(&boot_info.memory_map) };     allocator::init_heap(&mut mapper, &mut frame_allocator).expect("heap initialization failed");      test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[test_case]@@ -76,5 +76,5 @@ fn large_allocation_uses_fallback() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -3,7 +3,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -14,20 +14,20 @@ mod shparse; use alloc::{string::String, sync::Arc, vec, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo;-use rust_kernel::fs::{self, InodeKind, file::File};-use rust_kernel::memory;-use rust_kernel::process::{self, ExitStatus, SpawnArgs};+use rustbelt::fs::{self, InodeKind, file::File};+use rustbelt::memory;+use rustbelt::process::{self, ExitStatus, SpawnArgs}; use shparse::{Token, Word, parse, tokenize};  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();-    rust_kernel::init_memory(boot_info);+    rustbelt::init();+    rustbelt::init_memory(boot_info);     fs::init();-    rust_kernel::init_storage();+    rustbelt::init_storage();     test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  fn w(text: &str) -> Token {@@ -214,5 +214,5 @@ fn processes_give_their_memory_back() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -4,14 +4,14 @@ #![no_main]  use core::panic::PanicInfo;-use rust_kernel::{QemuExitCode, exit_qemu, serial_print, serial_println};+use rustbelt::{QemuExitCode, exit_qemu, serial_print, serial_println};  #[unsafe(no_mangle)] pub extern "C" fn _start() -> ! {     should_fail();     serial_println!("[test did not panic]");     exit_qemu(QemuExitCode::Failed);-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  fn should_fail() {@@ -23,5 +23,5 @@ fn should_fail() { fn panic(_info: &PanicInfo) -> ! {     serial_println!("[ok]");     exit_qemu(QemuExitCode::Success);-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }
@@ -6,13 +6,13 @@  use core::panic::PanicInfo; use lazy_static::lazy_static;-use rust_kernel::{QemuExitCode, exit_qemu, serial_print, serial_println};+use rustbelt::{QemuExitCode, exit_qemu, serial_print, serial_println}; use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame};  #[unsafe(no_mangle)] pub extern "C" fn _start() -> ! {     serial_print!("stack_overflow::stack_overflow...\t");-    rust_kernel::gdt::init();+    rustbelt::gdt::init();     TEST_IDT.load(); // our own IDT whose double-fault handler reports success     stack_overflow();     panic!("Execution continued after stack overflow");@@ -30,7 +30,7 @@ lazy_static! {         unsafe {             idt.double_fault                 .set_handler_fn(test_double_fault_handler)-                .set_stack_index(rust_kernel::gdt::DOUBLE_FAULT_IST_INDEX);+                .set_stack_index(rustbelt::gdt::DOUBLE_FAULT_IST_INDEX);         }         idt     };@@ -42,10 +42,10 @@ extern "x86-interrupt" fn test_double_fault_handler( ) -> ! {     serial_println!("[ok]");     exit_qemu(QemuExitCode::Success);-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -3,29 +3,29 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo; use core::sync::atomic::{AtomicBool, AtomicU64, Ordering};-use rust_kernel::allocator;-use rust_kernel::interrupts::TICKS;-use rust_kernel::memory::{self, BootInfoFrameAllocator};-use rust_kernel::thread;+use rustbelt::allocator;+use rustbelt::interrupts::TICKS;+use rustbelt::memory::{self, BootInfoFrameAllocator};+use rustbelt::thread; use x86_64::VirtAddr;  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();+    rustbelt::init();     let phys_mem_offset = VirtAddr::new(boot_info.physical_memory_offset);     let mut mapper = unsafe { memory::init(phys_mem_offset) };     let mut frame_allocator = unsafe { BootInfoFrameAllocator::init(&boot_info.memory_map) };     allocator::init_heap(&mut mapper, &mut frame_allocator).expect("heap initialization failed");      test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  static COUNT_1: AtomicU64 = AtomicU64::new(0);@@ -72,5 +72,5 @@ fn busy_threads_are_preempted() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -5,7 +5,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -14,23 +14,23 @@ use alloc::{string::String, sync::Arc, vec, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo; use core::sync::atomic::{AtomicBool, Ordering};-use rust_kernel::errno::Errno;-use rust_kernel::fs::file::File;-use rust_kernel::interrupts::TICKS;-use rust_kernel::memory::{self, USER_START};-use rust_kernel::process::{self, ExitStatus, SpawnArgs};-use rust_kernel::thread::{self, WaitQueue};-use rust_kernel::{elf, fs, syscall};+use rustbelt::errno::Errno;+use rustbelt::fs::file::File;+use rustbelt::interrupts::TICKS;+use rustbelt::memory::{self, USER_START};+use rustbelt::process::{self, ExitStatus, SpawnArgs};+use rustbelt::thread::{self, WaitQueue};+use rustbelt::{elf, fs, syscall};  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();-    rust_kernel::init_memory(boot_info);+    rustbelt::init();+    rustbelt::init_memory(boot_info);     fs::init();-    rust_kernel::init_storage();+    rustbelt::init_storage();     test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  const BIN: &str = "/mnt/disk0/bin";@@ -197,5 +197,5 @@ fn wait_queue_wakes_the_waiter() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }
@@ -2,7 +2,7 @@ #![no_std] #![no_main] #![feature(custom_test_frameworks)]-#![test_runner(rust_kernel::test_runner)]+#![test_runner(rustbelt::test_runner)] #![reexport_test_harness_main = "test_main"]  extern crate alloc;@@ -10,19 +10,19 @@ extern crate alloc; use alloc::{string::String, vec, vec::Vec}; use bootloader::{BootInfo, entry_point}; use core::panic::PanicInfo;-use rust_kernel::errno::Errno;-use rust_kernel::fs::file::{File, InodeFile, KIND_FILE, SEEK_CUR, SEEK_END, SEEK_SET, Stat};-use rust_kernel::fs::{self, InodeKind, ramfs::RamFs};+use rustbelt::errno::Errno;+use rustbelt::fs::file::{File, InodeFile, KIND_FILE, SEEK_CUR, SEEK_END, SEEK_SET, Stat};+use rustbelt::fs::{self, InodeKind, ramfs::RamFs};  entry_point!(main);  fn main(boot_info: &'static BootInfo) -> ! {-    rust_kernel::init();-    rust_kernel::init_memory(boot_info);+    rustbelt::init();+    rustbelt::init_memory(boot_info);     fs::init();      test_main();-    rust_kernel::hlt_loop();+    rustbelt::hlt_loop(); }  #[test_case]@@ -150,5 +150,5 @@ fn pipes_pass_bytes_and_report_eof() {  #[panic_handler] fn panic(info: &PanicInfo) -> ! {-    rust_kernel::test_panic_handler(info)+    rustbelt::test_panic_handler(info) }