Open
Description
Currently the root module of the firmware is core/start.zig
. This has one upside and one downside. The upside is that we can export the startup logic without requiring the user to do anything. However this can be solved by requiring the user to call a function at comptime like this:
const microzig = @import("microzig");
comptime {
microzig.cpu.export_startup_logic(); // would export startup logic
}
pub fn main() {
}
The downside is that the user loses the ability to control the root
module, which is often used to configure other dependencies (even std). This has been worked around for std
but for other deps there is currently no solution that I am aware of.
If the user's module is the root module, then you can specify all the configuration you want directly, like you would do for a normal zig program.