0e40f7f1cd7c11ff34a89c348e1a7304d3e17f66
rcalc
Desktop calculator for Linux/Windows/macOS, inspired by the Windows Calculator (standard mode).
Built with Rust + Slint.
Run
cargo run --release
# or
./dist/rcalc
Icon (Linux / Wayland)
On Wayland the window icon property is ignored — the desktop uses
.desktop + app_id. Install once:
./scripts/install-desktop.sh
Then start rcalc from the app menu (or ~/.local/bin/rcalc), not by
clicking a random binary path, so KDE/GNOME can match app_id=rcalc to
rcalc.desktop and show the icon.
Features
- Modes: Standard, Programmer, Convert
- Standard:
+ − × ÷,%,±,1/x,x²,√x, memory - Programmer: simultaneous HEX / DEC / OCT / BIN, sizes QWORD / DWORD / DINT / WORD / INT / BYTE, bitwise ops, clickable bits (WORD/DWORD — unsigned DEC; INT/DINT — signed)
- Convert: float32 ↔ two 16-bit words with endian AB CD / CD AB / BA DC / DC BA
- Convert → Ratio: float → minimal num/den for electronic gear (Byte≤255 / Word≤65535)
- Convert → ASCII: Char ↔ Hex ↔ Dec (control names for NUL…DEL)
- CRC: Modbus RTU CRC-16 + Modbus ASCII LRC from hex bytes (
01 03 00 00 00 0A) - Keyboard input
Project layout
src/engine.rs— standard calculator logicsrc/programmer.rs— programmer mode logicsrc/convert.rs— float32 / word endian convertsrc/main.rs— UI wiringui/app.slint— Slint interfacedist/rcalc— release binary
Languages
Rust
64.5%
Slint
24.5%
Shell
11%