| Crates.io | limine-protocol-for-rust |
| lib.rs | limine-protocol-for-rust |
| version | 0.2.1 |
| created_at | 2025-12-19 19:38:09.740093+00 |
| updated_at | 2025-12-28 13:29:40.506576+00 |
| description | Library for implementation of the Limine Boot Protocol in kernel binaries |
| homepage | |
| repository | https://github.com/h3tR/limine-protocol |
| max_upload_size | |
| id | 1995393 |
| size | 64,374 |
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();
}