Skip to content

Richard-W/efw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

efw Latest Version Build Status

Framework for writing UEFI application


State of development

The types in this crate do not yet wrap the entirety of the UEFI spec. Currently only a subset of UEFI functions are defined. Some types (SystemTable) for example allow you access lower layers though (via the bits() method).

Getting started

This is a hello world application using efw:

#![no_std]
#![no_main]

#[macro_use] extern crate efw;

#[no_mangle]
fn efw_main() {
    println!("Hello, world!");
}

efw reexports the contents of the alloc crate so you can use dynamic memory allocation:

#![no_std]
#![no_main]

#[macro_use] extern crate efw;

#[no_mangle]
fn efw_main() {
    let vector = vec![1, 2, 3];
    println!("Allocated vector: {:?}", vector);
}

To be able to use cargo build to build the applications you should add the following to .cargo/config.toml:

[unstable]
build-std = ["core", "compiler_builtins", "alloc"]
build-std-features = ["compiler-builtins-mem"]

Protocol support

efw provides a set of predefined protocols that are needed for it to function properly. You can extend the set of protocols though by implementing the Protocol trait. That trait provides methods for finding handles supporting the protocol.

About

Framework for writing UEFI applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published