How hawkw/mycelium works
Main Components
a. Kernel Core (Central Component)
• WebAssembly Runtime (/src/wasm/)
• WASI Implementation (/src/wasm/wasi.rs)
• Shell Interface (/src/shell.rs)
• Runtime Services (/src/rt.rs)
b. Hardware Abstraction Layer (HAL)
• HAL Core Interface (hal-core/)
• x86_64 Implementation (hal-x86_64/)
• Hardware-specific components:
• Interrupt handling
• Memory management
• CPU management
• Device drivers
c. Core Libraries
• Cordyceps (Intrusive data structures)
• Maitake (Async runtime)
• Memory Allocation (alloc/)
• Utility Layer (util/)
d. Device Drivers Layer (/src/drivers/)
• PCI
• IDE
• PS/2 Keyboard
Component Relationships
• HAL layer directly below the kernel core
• Core Libraries to the left side, showing their support role
• Device Drivers above the HAL layer
• WebAssembly/WASI interface at the top level
Specific Design Elements
Use the following visual elements:
• Rectangle blocks for major components
• Hexagons for hardware interfaces
• Rounded rectangles for libraries
• Double lines for API boundaries
Layer Organization
From top to bottom:
Important Details
• Async Runtime Flow: Show how Maitake integrates with the kernel
• Memory Management: Illustrate the buddy allocator's position
• Interrupt Handling: Show the flow from hardware through HAL to kernel
• Driver Interface: Demonstrate PCI and device management
• WebAssembly Integration: Show module execution flow