Expand description
Scheme Router (SR) - central registry for all schemes.
The Scheme Router manages scheme registration and provides a unified interface for mounting schemes in the VFS namespace.
ยงUsage
// Register a scheme
let scheme_id = scheme_router::register("my_scheme", my_scheme);
// Mount at a path
mount_scheme("my_scheme", "/my/path")?;Re-exportsยง
use crate::ipc::port::PortId;๐use crate::sync::SpinLock;๐use crate::syscall::error::SyscallError;๐use crate::vfs::scheme::DynScheme;๐use crate::vfs::scheme::IpcScheme;๐use crate::vfs::scheme::KernelScheme;๐use alloc::collections::BTreeMap;๐use alloc::string::String;๐use alloc::sync::Arc;๐use alloc::vec::Vec;๐use spin::RwLock;๐
Structsยง
- Scheme
Entry - Scheme registry entry
- Scheme
Router - Scheme router state
Staticsยง
- INITFS_
KERNEL_ ๐SCHEME - SCHEME_
ROUTER ๐ - Global scheme router
Functionsยง
- get_
initfs_ file_ bytes - Returns the static bytes of a registered /initfs file.
- get_
scheme - Get a scheme by name
- init_
builtin_ schemes - Initialize built-in schemes
- list_
schemes - List all registered schemes (for debugging)
- mount_
scheme - Mount a registered scheme at a path
- register_
initfs_ file - Register a static file in the kernel-backed /initfs scheme.
- register_
ipc_ scheme - Create and register an IPC scheme for a userspace server
- register_
scheme - Register a scheme globally