Expand description
The aptly-named tiny crate containing the first OS code to run.
The nano_core
is very simple, and only does the following things:
- Bootstraps the OS after the bootloader is finished, and initializes simple things like logging.
- Establishes a simple virtual memory subsystem so that other modules can be loaded.
- Loads the core library module, the
captain
module, and then calls [captain::init()
] as a final step.
That’s it! Once nano_core
gives complete control to the captain
, it takes no other actions.
In general, you shouldn’t ever need to change nano_core
.
That’s because nano_core
doesn’t contain any specific program logic,
it just sets up an initial environment so that other subsystems can run.
If you want to change how the OS starts up and which systems it initializes,
you should change the code in the [captain
] crate instead.
Macros
- Just like Rust’s
try!()
macro, but instead of performing an early return upon an error, it invokes theshutdown()
function upon an error in order to cleanly exit Theseus OS.