feat(userspace): log server sole console holder; init boots from manifest; adapter loads only init+storage

This commit is contained in:
2026-10-27 15:40:19 +01:00
parent 4049ba5007
commit a4f467f45d
21 changed files with 510 additions and 325 deletions

View File

@@ -4,8 +4,13 @@ struct Writer;
impl fmt::Write for Writer {
fn write_str(&mut self, s: &str) -> fmt::Result {
// Without a console capability, output goes nowhere.
if let Some(console) = crate::start::console() {
// The log server first; a process without either prints nothing.
// A call, not a send: the text is out before the caller goes on.
if let Some(log) = crate::start::log() {
for chunk in s.as_bytes().chunks(types::log::TEXT_BYTES) {
let _ = crate::syscall::call(log, types::log::text_words(chunk), None);
}
} else if let Some(console) = crate::start::console() {
for &b in s.as_bytes() {
crate::syscall::debug_putchar(console, b);
}