ReturnInfinity/BareMetal

A very minimal, resource efficient exo-kernel

Assembly

937

7 commits

updated Jun 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

Build on BareMetal

1

Sep 4, 2026

Contest announcement – Build on BareMetal Cloud Sep 7-20

1

Sep 2, 2026

I haven't explored it, but you might check out http://www.returninfinity.com/baremetalnode.html You can also get pretty far on modern Linux by reserving cores for computation with NOHZ_FULL: http://www.breakage.org/2013/11/nohz_fullgodmode/

on Computers are fast

0

May 13, 2014

good idea, I would buy two kinds of books 1) one which aggregates all the "How do I write an OS from scratch" info under links below into one coherent whole. and 2) a tutorial on how to build a domain-specific OS, say OS that only knows to run a web-server, or OS for FPGA or Raspberry Pi, or a…

on Ask HN: Would self-taught programmers be interested in such a book?

0

May 7, 2014

Looks like Erlang is already getting one step closer to the metal: http://erlangonxen.org/ http://kerlnel.org/ Also there is another project that can be related to that goal: "Our aim is to remove the bloated layer that sits between hardware and the running application, such as CouchDB or Node.js"…

on The Birth and Death of JavaScript [video]

0

Apr 18, 2014

There's absolutely a void when it comes to a full amd64 assembly (and associated low level) code. It's a shame, because amd64 is actually rather plesant (as opposed to x86) -- and now rather ubiqutous. I haven't really looked at the code, but I guess the following at least contains a bit of example…

on How to Make a Computer Operating System in C/C++

0

Dec 2, 2013

Not GNU projects but relevant and different kernels / operating systems: http://www.barrelfish.org/ https://github.com/xomboverlord/xomb http://www.returninfinity.com/baremetal.html http://en.wikipedia.org/wiki/SeL4 I don't consider any of these to be a waste of time in the least; some move quicker…

on GNU Hurd 0.5, GNU Mach 1.4, GNU MIG 1.4 released

0

Sep 28, 2013

Operating systems - http://www.menuetos.net/ http://www.returninfinity.com/baremetal.html http://mikeos.berlios.de/write-your-own-os.html Embedded systems - http://thinkingeek.com/2013/02/02/arm-assembler-raspberry-pi...

on LLVM Intermediate Representation is better than assembly

0

Jul 24, 2013

Wouldn't it be more feasible to make the Erlang VM run on Baremetal OS[1], and contribute to it? Thousands of hours will be spent on kernel development and hardware issues for what is mostly duplicated effort. [1] http://www.returninfinity.com/baremetal.html

on Project started to run Erlang on bare metal

0

Jan 26, 2013

Good luck and thumbs up for the idea of writing a new OS. I think an inspiration would be to look at BareMetal OS, perhaps you can find some ideas there. http://www.returninfinity.com/baremetal.html

on I’m writing my own OS

0

Nov 27, 2012

README

BareMetal Logo

BareMetal

Just enough kernel

Assembly License

Exokernel • 100% Assembly • Virtual/Physical

Official repo of the open-source BareMetal exokernel. It's written from scratch in Assembly, designed for x86-64 hardware, with no dependencies except for the virtual/physical hardware. An ARM and/or RISC-V rewrite would be considered once hardware is standardized.

Table of Contents

What it is

BareMetal is a very lean kernel. The name is a play on the phrase "bare metal" which means to run directly on physical or virtualized hardware. BareMetal also only offers the "bare essentials" required for a working operating system.

BareMetal provides basic support for symmetric multiprocessing, network, and storage access via a low-level abstraction layer.

Architecture

BareMetal is an exokernel and offers a single address space system.

It is written in assembly to achieve high-performance computing with a minimal footprint and a "just enough operating system” approach.

The kernel is primarily targeted towards physical and virtualized environments for cloud computing, or HPC clusters. It could also be used as a unikernel.

“Do not try to do everything. Do one thing well.” — Steve Jobs

The premise of the kernel is to "do one thing well" and that is to execute a program with zero overhead.

Key features

  • BIOS/UEFI: Both boot methods are supported via the companion Pure64 loader.
  • 64-bit only: Make use of the extra-wide and additional registers available in 64-bit mode.
  • Mono-processing, multi-core: The system is able to execute a single program but can spread the work load amongst available CPU cores.
  • Extremely tiny memory footprint: The kernel binary is less than 32KiB. BareMetal uses 4 MiB of RAM while running. The majority of its RAM usage is for required memory structures while operating in 64-bit mode, drivers/system buffers, and CPU stacks. All other system memory is dedicated to the running program.
  • Physical and virtual hardware support with full virtualization, using x86 hardware virtualization whenever available (it is on most modern x86-64 CPU's). In principle BareMetal should run on any x86-64 hardware platform, even on a physical x86-64 computer, given appropriate drivers. Officially, we develop on QEMU and VirtualBox, which means that you can run BareMetal on both Linux, Microsoft Windows, and Apple macOS.

Supported Hardware

  • CPU
    • Multi-core on 64-bit x86 systems (Intel/AMD)
  • Bus
    • PCIe
    • PCI
  • Network
    • Virtio-Net
  • Storage
    • Virtio-Blk
  • HID (Human Interface Devices)
    • Input
      • PS/2 Keyboard
      • Serial
    • Output
      • LFB (linear frame buffer at native screen resolution with 1024x768x32bpp as fallback)
      • VGA text mode (80x25 characters with 16 colors)
      • Serial

Try it out

See the BareMetal-OS repo for a full build environment.

// EOF

assembly
baremetal
baremetal-kernel
kernel

ReturnInfinity/BareMetal

A very minimal, resource efficient exo-kernel

Assembly

937

7 commits

updated Jun 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

Build on BareMetal

1

Sep 4, 2026

Contest announcement – Build on BareMetal Cloud Sep 7-20

1

Sep 2, 2026

I haven't explored it, but you might check out http://www.returninfinity.com/baremetalnode.html You can also get pretty far on modern Linux by reserving cores for computation with NOHZ_FULL: http://www.breakage.org/2013/11/nohz_fullgodmode/

on Computers are fast

0

May 13, 2014

good idea, I would buy two kinds of books 1) one which aggregates all the "How do I write an OS from scratch" info under links below into one coherent whole. and 2) a tutorial on how to build a domain-specific OS, say OS that only knows to run a web-server, or OS for FPGA or Raspberry Pi, or a…

on Ask HN: Would self-taught programmers be interested in such a book?

0

May 7, 2014

Looks like Erlang is already getting one step closer to the metal: http://erlangonxen.org/ http://kerlnel.org/ Also there is another project that can be related to that goal: "Our aim is to remove the bloated layer that sits between hardware and the running application, such as CouchDB or Node.js"…

on The Birth and Death of JavaScript [video]

0

Apr 18, 2014

There's absolutely a void when it comes to a full amd64 assembly (and associated low level) code. It's a shame, because amd64 is actually rather plesant (as opposed to x86) -- and now rather ubiqutous. I haven't really looked at the code, but I guess the following at least contains a bit of example…

on How to Make a Computer Operating System in C/C++

0

Dec 2, 2013

Not GNU projects but relevant and different kernels / operating systems: http://www.barrelfish.org/ https://github.com/xomboverlord/xomb http://www.returninfinity.com/baremetal.html http://en.wikipedia.org/wiki/SeL4 I don't consider any of these to be a waste of time in the least; some move quicker…

on GNU Hurd 0.5, GNU Mach 1.4, GNU MIG 1.4 released

0

Sep 28, 2013

Operating systems - http://www.menuetos.net/ http://www.returninfinity.com/baremetal.html http://mikeos.berlios.de/write-your-own-os.html Embedded systems - http://thinkingeek.com/2013/02/02/arm-assembler-raspberry-pi...

on LLVM Intermediate Representation is better than assembly

0

Jul 24, 2013

Wouldn't it be more feasible to make the Erlang VM run on Baremetal OS[1], and contribute to it? Thousands of hours will be spent on kernel development and hardware issues for what is mostly duplicated effort. [1] http://www.returninfinity.com/baremetal.html

on Project started to run Erlang on bare metal

0

Jan 26, 2013

Good luck and thumbs up for the idea of writing a new OS. I think an inspiration would be to look at BareMetal OS, perhaps you can find some ideas there. http://www.returninfinity.com/baremetal.html

on I’m writing my own OS

0

Nov 27, 2012

README

BareMetal Logo

BareMetal

Just enough kernel

Assembly License

Exokernel • 100% Assembly • Virtual/Physical

Official repo of the open-source BareMetal exokernel. It's written from scratch in Assembly, designed for x86-64 hardware, with no dependencies except for the virtual/physical hardware. An ARM and/or RISC-V rewrite would be considered once hardware is standardized.

Table of Contents

What it is

BareMetal is a very lean kernel. The name is a play on the phrase "bare metal" which means to run directly on physical or virtualized hardware. BareMetal also only offers the "bare essentials" required for a working operating system.

BareMetal provides basic support for symmetric multiprocessing, network, and storage access via a low-level abstraction layer.

Architecture

BareMetal is an exokernel and offers a single address space system.

It is written in assembly to achieve high-performance computing with a minimal footprint and a "just enough operating system” approach.

The kernel is primarily targeted towards physical and virtualized environments for cloud computing, or HPC clusters. It could also be used as a unikernel.

“Do not try to do everything. Do one thing well.” — Steve Jobs

The premise of the kernel is to "do one thing well" and that is to execute a program with zero overhead.

Key features

  • BIOS/UEFI: Both boot methods are supported via the companion Pure64 loader.
  • 64-bit only: Make use of the extra-wide and additional registers available in 64-bit mode.
  • Mono-processing, multi-core: The system is able to execute a single program but can spread the work load amongst available CPU cores.
  • Extremely tiny memory footprint: The kernel binary is less than 32KiB. BareMetal uses 4 MiB of RAM while running. The majority of its RAM usage is for required memory structures while operating in 64-bit mode, drivers/system buffers, and CPU stacks. All other system memory is dedicated to the running program.
  • Physical and virtual hardware support with full virtualization, using x86 hardware virtualization whenever available (it is on most modern x86-64 CPU's). In principle BareMetal should run on any x86-64 hardware platform, even on a physical x86-64 computer, given appropriate drivers. Officially, we develop on QEMU and VirtualBox, which means that you can run BareMetal on both Linux, Microsoft Windows, and Apple macOS.

Supported Hardware

  • CPU
    • Multi-core on 64-bit x86 systems (Intel/AMD)
  • Bus
    • PCIe
    • PCI
  • Network
    • Virtio-Net
  • Storage
    • Virtio-Blk
  • HID (Human Interface Devices)
    • Input
      • PS/2 Keyboard
      • Serial
    • Output
      • LFB (linear frame buffer at native screen resolution with 1024x768x32bpp as fallback)
      • VGA text mode (80x25 characters with 16 colors)
      • Serial

Try it out

See the BareMetal-OS repo for a full build environment.

// EOF

assembly
baremetal
baremetal-kernel
kernel

Significant stargazers

Delyan Angelov

380 followers · starred Aug 2025

Xe Iaso

4,258 followers · starred Oct 2026

Tony Garnock-Jones

475 followers · starred Oct 2014

Wes

130 followers · starred Jun 2024