Skip to content

earowley/bootnim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bootnim

About

bootnim is a development environment for writing UEFI drivers/applications in Nim. It features a tiny libc written in Nim to support some of the Nim standard library within the UEFI runtime environment. It also features a Nim-based library that supports UEFI functionality.

Build Requirements

  • Nim 2.0+
  • Zig 0.13.0
    • Any C compiler can be substituted but Zig is lightweight, comes with a UEFI target, and includes out-of-the-box cross-compilation

Initial Setup

MacOS

In MacOS you can install the build dependencies with brew, for example:

$ brew install nim zig

Arch Linux

In Arch Linux, you can use pacman, for example:

$ pacman -S nim zig

Windows

See installation details for zig and nim, and make sure they are added to your PATH

Building

  1. Install the build requirements
  2. Clone this repository
$ git clone https://github.com/earowley/bootnim && cd bootnim
  1. (Optional) If using QEMU, move OVMF.fd under images/
  2. Modify the main function under src/main.nim
# Must be exported by default
# You can modify the "Nim entry point" in stubs/app.nim
proc main* =
    echo "Hello world"
  1. Run desired nimble build
# Creates .efi binary under build/bin
$ nimble build
# Creates .efi binary and launches QEMU
$ nimble qemu

Demo Gif

About

An environment for UEFI development with Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published