description | Fast system information written in Rust |
homepage URL | https://github.com/carmesim/pulga |
repository URL | https://github.com/carmesim/pulga.git |
owner | vrmiguel99@gmail.com |
last change | Tue, 2 Feb 2021 01:23:59 +0000 (1 22:23 -0300) |
last refresh | Sat, 27 Apr 2024 10:55:23 +0000 (27 12:55 +0200) |
mirror URL | git://repo.or.cz/pulga.git |
https://repo.or.cz/pulga.git | |
ssh://git@repo.or.cz/pulga.git | |
bundle info | pulga.git downloadable bundles |
content tags |
Early work in progress
Pulga
aims to be a customizable, highly performant command-line system information tool.
Different than similar tools, such as Neofetch and pfetch, which are written in scripting languages, Pulga is written in Rust, focusing on obtaining all of its data mostly using the standard libraries of Rust and C, alongside system files & libraries. Pulga currently runs in under 10 milliseconds even on low-end hardware.
On a Raspberry 3 Model B running Raspbian 10, we ran the following command:
hyperfine --warmup 5 "./pulga" "./neofetch"
Pulga (as of this commit) had a mean runtime of 6.0 ms ± 2.1 ms.
Neofetch (as of this commit) had a mean runtime of 1.281 s ± 0.064 s.
Overall:
'./pulga' ran
213.03 ± 76.66 times faster than './neofetch'
This is, of course, not a 'fair' match since Pulga does not offer feature-parity with Neofetch.
Even though Pulga makes use of Unsafe Rust and FFI with the C standard library, Pulga does not do away with memory safety.
At every commit, the GitHub Actions workflow runs Pulga under Valgrind. If Valgrind encounters any error, the build is considered to be a failure.
Cargo and a somewhat recent Rust toolchain must be installed to build. Get rustup if you want to install Rust.
git clone https://github.com/carmesim/pulga
cd pulga
cargo build --release # Build Pulga with no extra dependencies
# or
cargo build --release --features use_xlib # Run Pulga with dependencies on X11 and RandR (see the Dependencies section)
systemd
-based systemspulga.toml
file.-r/--random
implemented so farPulga currently focuses solely on Linux distros. Supporting other Unix-like OSes is possible in the future. Supporting Windows is a non-goal.
By default, Pulga does not have any dependencies not handled by Cargo. Screen resolution is obtained through by looking in /sys/class/drm/*/modes
, which works in both X11 and Wayland.
If, for some reason, you'd like to use Xlib to fetch screen resolution instead, you may do that by activating the feature use_xlib
. Do note that the default method is much faster. Xlib makes Pulga almost two times slower.
For this to work, two very common libraries must be installed.
sudo apt install libx11-dev libxrandr-dev
sudo pacman -S libx11 libxrandr
3 years ago | master | logtree |