Neofetch (Rust)
A fast, cross-platform system information tool written in Rust. This is a modern reimplementation of the classic neofetch tool with improved performance, comprehensive error handling, and support for multiple platforms.
Features
- ๐ Blazing Fast - Written in Rust for maximum performance
- ๐ Cross-Platform - Supports Windows, Linux, macOS, Android, and OpenWrt
- ๐จ Beautiful Output - Colorful ASCII art with system information
- ๐ง Comprehensive - Displays CPU, memory, disk, GPU, network, and more
- โก Async - Parallel information gathering for speed
- ๐ก๏ธ Robust - Proper error handling with detailed error messages
- ๐ฆ Zero Config - Works out of the box, no configuration needed
Installation
From crates.io
From source
The binary will be available at target/release/neofetch
Usage
Simply run:
win
ubuntu
darwin
android
Linux aarch64
openwrt
System Information Displayed
- Operating System - Name, version, and architecture
- Host - Device manufacturer and model
- Kernel - Kernel version
- Uptime - System uptime
- Packages - Installed packages (dpkg, pacman, snap, scoop, opkg)
- Shell - Current shell and version
- Display - Resolution and refresh rate
- Desktop Environment - DE name
- Window Manager - WM name and theme
- Terminal - Terminal emulator
- CPU - Model, cores, and frequency
- GPU - Graphics card information
- Memory - RAM usage
- Disk - Disk usage for mounted filesystems
- Battery - Battery percentage (if available)
- Network - Network interfaces and IP addresses
- Temperature - System temperature sensors (if available)
- Locale - System locale
Platform Support
| Platform | Status | Notes |
|---|---|---|
| Windows 10/11 | โ Full Support | x86, x86_64, ARM64 |
| Linux | โ Full Support | Ubuntu, Debian, Arch, Fedora, etc. |
| macOS | โ Full Support | Intel and Apple Silicon |
| Android | โ Full Support | ARM and ARM64 |
| OpenWrt | โ Full Support | Embedded routers |
| FreeBSD | โ ๏ธ Partial | Basic support |
Performance
This Rust implementation is significantly faster than the original shell-based neofetch:
windows
ubuntu
android
Building from Source
Prerequisites
- Rust 1.70 or later
- Cargo (comes with Rust)
Platform-Specific Requirements
Windows
- Visual Studio Build Tools or MinGW-w64
- No additional dependencies required
Linux
- GCC or Clang
- Standard development tools (
build-essentialon Debian/Ubuntu)
macOS
- Xcode Command Line Tools:
xcode-select --install
Android
- Android NDK
- Cargo NDK:
cargo install cargo-ndk
Build Instructions
# Clone the repository
# Build in release mode
# Run
Cross-Compilation
For Android
# Add Android targets
# Build for ARM64
For OpenWrt
# Add target
# Build
Architecture
The project is organized into several modules:
- error - Centralized error handling using thiserror
- utils - Reusable utilities for file I/O, process execution, and platform detection
- platform - Platform-specific implementations (Windows WMI, Linux /proc, macOS sysctl, Android properties)
- collectors - Individual system information collectors (CPU, memory, disk, etc.)
- display - Output formatting and ASCII art
Error Handling
This implementation uses comprehensive error handling with the thiserror crate. All operations return Result types with detailed error messages, making debugging easier and preventing panics.
use ;
async
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Setup
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
cargo test - Run clippy:
cargo clippy - Format code:
cargo fmt - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Code Style
- Follow Rust naming conventions
- Use English for all code, comments, and documentation
- Add rustdoc comments for public APIs
- Write tests for new functionality
- Ensure code passes
cargo clippywithout warnings
Troubleshooting
Windows
Issue: WMI queries fail
- Solution: Run as Administrator or check Windows Management Instrumentation service is running
Issue: Display information not available
- Solution: This is expected on Windows Server Core or systems without display drivers
Linux
Issue: Permission denied reading /proc or /sys files
- Solution: Some files require root access. Run with
sudoif needed
Issue: Temperature sensors not found
- Solution: Install
lm-sensorspackage and runsensors-detect
macOS
Issue: Temperature information not available
- Solution: Install
osx-cpu-tempvia Homebrew:brew install osx-cpu-temp
Issue: Some system information requires elevated privileges
- Solution: Run with
sudofor complete information
Android
Issue: Some properties not accessible
- Solution: Root access may be required for certain system properties
Comparison with Other Tools
| Feature | neofetch (Rust) | neofetch (Shell) | fastfetch |
|---|---|---|---|
| Speed | โกโกโก | โก | โกโกโก |
| Cross-platform | โ | โ | โ |
| Error Handling | โ | โ | โ ๏ธ |
| Async | โ | โ | โ |
| Memory Usage | Low | Medium | Low |
| Dependencies | Minimal | Many | Minimal |
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Original neofetch by Dylan Araps
- fastfetch for inspiration
- The Rust community for excellent tools and libraries