Use rustpkg to compile the kernel crate
miselin opened this issue · comments
Currently dependencies don't work too well in the Makefile
. Ideally we'd use something like rustpkg
to manage the actual compilation of the kernel crate (and any other important crates), and then link the results together with the C and ASM glue.
Because we have no real way of determining a recompile is necessary when anything other than main.rs
changes, we will probably just have to run rustpkg
every time make
is executed. This is a real incentive to make sure we're avoiding as much cruft in the code as possible to optimise compile time.
This would need to be done in such a way that cross-compiling doesn't break. Fortunately I do a reasonable amount of development on OSX where we cross from the Mach host to ELF target, so it will be immediately obvious if things are broken.
The kernel and its dependencies are now built using cargo
, so this is done.