link-boot

Crates.iolink-boot
lib.rslink-boot
version0.2.1
created_at2025-03-29 09:02:45.842463+00
updated_at2025-03-29 12:11:53.810838+00
descriptionmacros for link mod to boot section
homepage
repositoryhttps://github.com/rcore-os/link-boot
max_upload_size
id1610966
size5,142
周睿 (ZR233)

documentation

README

Link Boot

This is a macros crate to link mod to .text.boot or .data.boot section.

Example

#[link_boot::link_boot]
mod boot {
    pub fn fooo() {
        println!("foo");
    }

    pub static BAR: i32 = 1;

    struct Cat {}
}

expand to:

mod boot {
    #[unsafe(link_section = ".text.boot")]
    pub fn fooo() {
        {
            std::io::_print(std::format_args_nl!("foo"));
        };
    }
    #[unsafe(link_section = ".data.boot")]
    pub static BAR: i32 = 1;
    struct Cat {}
}
Commit count: 4

cargo fmt