feat(session-server): add session server for app launching, remove apps from init manifest

Init now only starts servers. The session server holds ProcessCreate cap
and launches apps on demand. Snake is no longer in the boot manifest.
This commit is contained in:
2026-10-18 04:09:28 +02:00
parent 29434805a6
commit 41f7e7db10
10 changed files with 347 additions and 24 deletions

View File

@@ -94,14 +94,6 @@ pub fn boot(manifest: &BootManifest, create_cap: CapSlot) -> BootResult {
}
}
for app in manifest.apps {
let _pid = syscall::create_process(create_cap.value() as usize);
for (_server_name, endpoint_name) in app.connects_to {
let _ep = endpoints.find(endpoint_name);
}
}
BootResult {
storage_endpoint,
create_cap,

View File

@@ -32,19 +32,9 @@ pub struct ServerEntry {
pub binary: BinarySource,
}
#[derive(Debug)]
pub struct AppEntry {
pub name: &'static str,
pub priority: Priority,
pub memory_pages: usize,
pub connects_to: &'static [(&'static str, &'static str)],
pub binary: BinarySource,
}
#[derive(Debug)]
pub struct BootManifest {
pub servers: &'static [ServerEntry],
pub apps: &'static [AppEntry],
}
pub static SNAKE_MANIFEST: BootManifest = BootManifest {
@@ -104,14 +94,19 @@ pub static SNAKE_MANIFEST: BootManifest = BootManifest {
restartable: true,
binary: BinarySource::Storage { path: "/servers/input.elf" },
},
],
apps: &[
AppEntry {
name: "snake",
ServerEntry {
name: "session",
priority: Priority::DEFAULT,
memory_pages: 64,
connects_to: &[("display", "display"), ("input", "input")],
binary: BinarySource::Storage { path: "/apps/snake.elf" },
hardware_caps: &[],
endpoints: &[
EndpointBinding::Own { name: "session" },
EndpointBinding::ConnectTo { server: "display", endpoint: "display" },
EndpointBinding::ConnectTo { server: "input", endpoint: "input" },
EndpointBinding::ConnectTo { server: "storage", endpoint: "storage" },
],
restartable: true,
binary: BinarySource::Storage { path: "/servers/session.elf" },
},
],
};