commit c1328d7ece4f98aa129b33d3fd3d35cb4a0cd229 Author: Gabriel Majeri Date: Wed Nov 22 19:06:09 2017 +0200 Add project skeleton diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..ea56350f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf + +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{rs,py}] +indent_style = space +indent_size = 4 + +[*.{md,json}] +indent_style = space +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6313b56c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..15b4514e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/target/ +Cargo.lock + +# OVMF images, which provide a UEFI firmware for QEMU. +/OVMF_CODE.fd +/OVMF_VARS.fd diff --git a/README.md b/README.md new file mode 100644 index 00000000..35bc9bb2 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# uefi-rs +This library allows you to write [UEFI][uefi] applications in Rust. + +[uefi]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface + +## Documentation +The best way to learn how to write UEFI applications is to read the [UEFI spec][spec] +and look at the example code in the `tests` directory. + +There is also the `x86_64-uefi.json` file, which is +a custom Rust target for 64-bit UEFI applications. + +## Running the tests +### Prerequisites +- [QEMU](https://www.qemu.org/) +- [Python 3](https://www.python.org) +- [OVMF](https://github.com/tianocore/tianocore.github.io/wiki/OVMF): + You need to extract `OVMF_CODE.fd` and `OVMF_VARS.fd` to the same directory as the `build.py` file. + Alternatively, install OVMF using your distro's package manager and change the paths in the script file. + +### Steps +It's as simple as running the `build.py` script with the `build` and `run` arguments: + +```sh +./build.py build run +``` + +You can also pass `doc` for generating documentation, or `clippy` to run Clippy.