XCoreGrid + XTachometer + XHistoryGraph + XLoadBadge + XUsageBar in one 1024x768 window, live /proc/stat + /proc/loadavg sampled every 500 ms. Seeded demo series cleared at startup and primed with the first live sample. Widget titles are the widget names (the Rust draw path uses state.name for the header).
lightgui_rust — LightGUI ported to Rust
Rust port of LightGUI
(HEAD eb0b5fc): an XFrame-native form designer with 562 XFrame widgets.
See PORTING_PLAN.md for the survey and module map.
Workspace
| Crate | C++ source | Status |
|---|---|---|
crates/lightgui-core |
src/model.h, src/props.h, src/events.h, src/project_io.cpp, canonicalize() in src/main.cpp |
done |
crates/lightgui-gen |
src/generator.cpp / src/generator.h (emits C++/XFrame, byte-identical) |
done |
crates/lightgui-debug |
src/debugger.cpp / src/debugger.h (GDB/MI) |
in progress |
crates/lightgui-support |
data extraction (registry, palette, indicators) | in progress |
probe/ is the step-0 crates.io probe (standalone, excluded from the
workspace). data/ / tools/ are generated data + extraction tooling.
Build / test
cargo test # workspace; rustc/cargo are login-shell-only: use `bash -lc`
cargo build # must be warning-free (the C++ build was zero-warning)
Rust 1.100.1 stable, GTK 3.24 (gtk-rs 0.18), serde/serde_json 1.0.
Monitor widgets (X*)
The 15 btop-family monitor widgets (registry 547–561, family X,
section Misc / X) live in crates/xframe-widgets/src/monitor.rs
(one MonitorWidget struct, kind-dispatched like InstrumentWidget,
new Archetype::Monitor). They draw with raw X11 via DrawTarget
only — no GTK calls inside the widgets — and their live checks use
the standard library only (/proc scans, systemctl is-active,
TcpStream::connect_timeout); no new dependencies.
| Widget | What it shows | Example |
|---|---|---|
XHistoryGraph |
Scrolling multi-series time-series graph, 60 s window, cur/min/max/avg legend | cargo run -p xframe-demo --example XHistoryGraph |
XCoreGrid |
One mini history graph per CPU core, label + current % each | cargo run -p xframe-demo --example XCoreGrid |
XNetGraph |
Dual up/down scrolling graph, current rates + byte totals | cargo run -p xframe-demo --example XNetGraph |
XTempHistory |
Temperature history with threshold line + over-temp colouring | cargo run -p xframe-demo --example XTempHistory |
XUsageBar |
Horizontal gradient usage bar with label + % text | cargo run -p xframe-demo --example XUsageBar |
XStackBar |
Stacked multi-segment bar (used/cached/buffers/free) + legend | cargo run -p xframe-demo --example XStackBar |
XVerticalBar |
Vertical bar meter with scale + peak-hold marker | cargo run -p xframe-demo --example XVerticalBar |
XTachometer |
Round tachometer: needle, redline zone, digital readout, peak hold | cargo run -p xframe-demo --example XTachometer |
XArcGauge |
Semicircular arc gauge, coloured zones, big % in the middle | cargo run -p xframe-demo --example XArcGauge |
XDonutGauge |
Circular progress ring with % centred | cargo run -p xframe-demo --example XDonutGauge |
XProcessList |
Live process table from /proc: sortable columns, in-cell CPU% bars |
cargo run -p xframe-demo --example XProcessList |
XLoadBadge |
Load averages (1/5/15 min) with colour thresholds + uptime | cargo run -p xframe-demo --example XLoadBadge |
XMonitorButton |
A button that is a live monitor: process / systemd unit / TCP port | cargo run -p xframe-demo --example XMonitorButton |
XMonitorGrid |
Panel of XMonitorButtons in a labelled grid, one shared poll timer |
cargo run -p xframe-demo --example XMonitorGrid |
XSysBox |
Composite resource box: title + big number + history graph + usage bar | cargo run -p xframe-demo --example XSysBox |
History widgets are seeded with deterministic demo series; a host app
feeds live samples with MonitorWidget::push_samples / push_value.
XProcessList, XLoadBadge, XMonitorButton and XMonitorGrid pull
live state in the constructor and re-poll through
MonitorWidget::poll / update / poll_all on the host's timer
(the demo runner has no periodic timer hook).
Docs
docs/stock-charts-csv.md— how the stock chart widgets ingest plotting data (CSV format, per-kind series, clear/populate, limits).