Pumas module structure overview
mainIf you are extending Pumas or building tools that interact with its logic, understand the following module boundaries:
Data Collection (src/modules/)
UI-agnostic modules that gather raw data:
powermetrics/: Parses macOSpowermetricsplist output (GPU, frequencies, power).sysinfo.rs: Provides CPU utilization.soc.rs: Provides SoC info viasysctlandsystem_profiler.vm_stat.rs: Provides memory statistics via thevm_statcommand.
Backend & Data Plane (src/backend/)
mod.rs: Contains the collector thread loop and the JSON exporter loop.frame.rs: Defines theFramesnapshot and per-tab sub-structs.history.rs: Manages theSignal<T>ring buffer and metric history.
Terminal UI (src/ui/)
Built with iocraft:
app_root.rs: The mainPumasAppcomponent handling the render loop and keyboard events.layout.rs: Handles pixel geometry derived from terminal size.components/: Reusable widgets likegauge,line_gauge,sparkline, andpanel.views/: Per-tab views (Overview, CPU, GPU, Memory, SoC).