Expand description
§Proka Bootloader - The bootloader of ProkaOS
Copyright (C) 2026 RainSTR Studio. All rights reserved.
§Introduction
This crate provides the struct, enums about the Proka bootloader, including the boot information, and so on.
§Example
Here’s an example to use this crateb
#![no_std]
#![no_main]
#![feature(custom_test_frameworks)]
#![test_runner(self::test_runner)]
#![reexport_test_harness_main = "test_main"]
use proka_bootloader::BootInfo;
use core::panic::PanicInfo;
// Panic handler
#[panic_handler]
pub fn panic(_: &PanicInfo) -> ! {
loop {}
}
#[unsafe(no_mangle)]
#[unsafe(link_section = ".text")]
pub extern "C" fn kernel_main() -> ! {
let info = proka_bootloader::get_bootinfo();
let framebuffer = info.framebuffer();
unsafe {
let ptr = framebuffer.address() as *mut u8;
for i in 0..500 {
let offset = framebuffer.pitch() * i + i * framebuffer.bpp();
ptr.add(offset as usize).cast::<u32>().write(0x00FFFFFF);
}
}
loop {}
}
// Test runner
#[cfg(test)]
fn test_runner(tests: &[&'static dyn Fn()]) {
for test in tests {
test();
}
}//! # LICENSE This crate is under license GPL-v3, and you must follow its rules.
See LICENSE file for more details.
§MSRV
This crate’s MSRV is 1.85.0 stable.
Modules§
- header
- The definition of proka-kernel header.
- memory
- The generic memory module, which provides memory info to kernel, so that kernel can know the memory structure easily.
- output
- The output module, which provides framebuffer info and its utilities.
Structs§
- Boot
Info - This struct is the boot information struct, which provides the basic information, memory map, and so on.
Enums§
- Boot
Mode - This is the boot mode, only support 2 modes, which are legacy(BIOS) and UEFI.
Functions§
- get_
bootinfo - Get the bootinfo.