Skip to content

217 implement proccpuinfo like device#218

Merged
AlixANNERAUD merged 6 commits intomainfrom
217-implement-proccpuinfo-like-device
Apr 9, 2026
Merged

217 implement proccpuinfo like device#218
AlixANNERAUD merged 6 commits intomainfrom
217-implement-proccpuinfo-like-device

Conversation

@AlixANNERAUD
Copy link
Copy Markdown
Contributor

@AlixANNERAUD AlixANNERAUD commented Apr 9, 2026

This pull request introduces a new virtual CPU information device for both native and WebAssembly (WASM) environments, exposes it in the virtual file system, and integrates it into the system's initialization and the Settings application's About tab. This enables users and applications to retrieve standardized CPU information (such as model, core count, and architecture) via a virtual file, improving system introspection and portability.

New CPU Information Device

  • Added CpuInformationsDevice implementation for both native (drivers/std/src/devices/cpu.rs) and WASM (drivers/wasm/src/devices/cpu.rs) targets, providing a /devices/cpu/informations character device that outputs formatted CPU details. The native version parses /proc/cpuinfo when available, while the WASM version uses browser APIs to estimate core count. Both fallback gracefully to "unknown" when data is missing. [1] [2]
  • Updated device module exports to include the new CPU device in both native and WASM drivers. [1] [2]

Virtual File System Integration

  • Modified system initialization in native, WASM, and test environments to create the /devices/cpu directory and mount the new CpuInformationsDevice at /devices/cpu/informations. [1] [2] [3] [4] [5] [6]

Settings Application Enhancement

  • Updated the Settings application's About tab to asynchronously read from /devices/cpu/informations and display a summary of the CPU model, core count, and architecture, improving the user's visibility into system hardware. [1] [2] [3]

Testing and Robustness

  • Included comprehensive unit tests for the new device implementations, covering parsing, formatting, reading with offsets, and error handling for unsupported writes. [1] [2]

@AlixANNERAUD AlixANNERAUD linked an issue Apr 9, 2026 that may be closed by this pull request
@AlixANNERAUD AlixANNERAUD enabled auto-merge (squash) April 9, 2026 21:06
@AlixANNERAUD AlixANNERAUD merged commit 988e311 into main Apr 9, 2026
3 checks passed
@AlixANNERAUD AlixANNERAUD deleted the 217-implement-proccpuinfo-like-device branch April 9, 2026 21:11
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 77.33333% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
executables/settings/src/tabs/about.rs 0.00% 30 Missing ⚠️
drivers/std/src/devices/cpu.rs 96.58% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement /proc/cpuinfo like device

1 participant