Theseus uses cargo, Rust's package manager and build tool, to automatically manage dependencies and invoke the actual Rust compiler for us.
We utilize cargo's workspace feature with a virtual manifest to group all of the main crates together into a single top-level meta project, which significantly speeds up build times.
As such, the crates from the main repository folders (
applications/) and all of their dependencies are all compiled into a single
The members of this workspace are defined in the root Cargo.toml manifest file, plus the list of other folders that should be ignored by cargo.
Although we use cargo to build all Rust code, we still use
make and Makefiles to handle high-level build tasks. You should never need to directly run
rustc commands; go through
The top-level Makefile essentially just invokes the Rust toolchain and compiler via
cargo, then copies the compiled object files from the appropriate
target/ directory into the top-level
build/ directory, and finally generates a bootable
.iso image using various bootloader tools, e.g., GRUB.
The only special build action the Makefile takes is to use the
nasm assembler to compile the architecture-specific assembly code in
nano_core/boot/, and then fully link that against the
nano_core into a separate static binary.
Continue on to the next section to read more about configuring Theseus's build.