limine-protocol-for-rust

Crates.iolimine-protocol-for-rust
lib.rslimine-protocol-for-rust
version0.2.1
created_at2025-12-19 19:38:09.740093+00
updated_at2025-12-28 13:29:40.506576+00
descriptionLibrary for implementation of the Limine Boot Protocol in kernel binaries
homepage
repositoryhttps://github.com/h3tR/limine-protocol
max_upload_size
id1995393
size64,374
RMI (h3tR)

documentation

README

Limine Protocol for Rust

Crates.io docs.rs
This crate implements a couple of utilities for making something compatible with the Limine Boot Protocol. It serves as an equivalent to the 'limine.h' file, along with some extra utilities for making response retrieval and reading provided data easier.

For more information read The Limine Boot Protocol.

Example Usage:

const REVISION: u64 = 4;

#[used]
#[unsafe(link_section = ".limine_reqs")]
static LIMINE_BASE_REVISION: [u64; 4] = use_base_revision(REVISION);

#[used]
#[unsafe(link_section = ".limine_req_start")]
static LIMINE_REQUEST_START_MARKER: [u64; 4] = REQUEST_START_MARKER;

#[used]
#[unsafe(link_section = ".limine_reqs")]
pub static MEMORY_MAP_REQUEST: MemoryMapRequest = MemoryMapRequest::new(REVISION);

#[used]
#[unsafe(link_section = ".limine_reqs")]
pub static FRAMEBUFFER_REQUEST: FramebufferRequest = FramebufferRequest::new(REVISION);

#[used]
#[unsafe(link_section = ".limine_reqs")]
pub static BOOTLOADER_INFO_REQUEST: BootloaderInfoRequest = BootloaderInfoRequest::new(REVISION);

#[used]
#[unsafe(link_section = ".limine_req_end")]
static LIMINE_REQUEST_END_MARKER: [u64; 2] = REQUEST_END_MARKER;

pub fn kernel_main() -> ! {
    let bootloader_info_resp = BOOTLOADER_INFO_REQUEST.get_response().expect("BootloaderInfo request had no response");
    kprint!("Bootloader: {} {}",bootloader_info_resp.get_name(), bootloader_info_resp.get_version());

    let memory_map_resp = MEMORY_MAP_REQUEST.get_response().expect("Memory map request had no response");
    let memory_map = memory_map_resp.get_entries();
}
Commit count: 0

cargo fmt