docs.rs failed to build aprender-viz-0.31.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
aprender-viz-0.64.0
trueno-viz
Table of Contents
Features
- 5.6x SIMD Speedup - Real platform intrinsics (SSE2/AVX2/NEON)
- 8ms Frame Time - 2X faster than btop's 16ms target
- GPU Compute - CUDA, Vulkan, Metal, and WebGPU
- Zero Dependencies - Pure Rust rendering to PNG, SVG, or terminal
ttop - Terminal Top
The flagship application. A pure Rust system monitor that's 10X better than btop.
Why ttop?
| Feature | ttop v2 | btop | htop |
|---|---|---|---|
| Frame time | < 1ms | 16ms | 50ms |
| Pure Rust | Yes (sovereign stack) | No (C++) | No (C) |
| GPU monitoring | NVIDIA + AMD | NVIDIA only | No |
| Zero-alloc rendering | Yes (CellBuffer) | No | No |
| Contract enforcement | provable-contracts | No | No |
| 14 panels | Yes | ~10 | ~5 |
| Deterministic mode | Yes | No | No |
| Deterministic mode | Yes | No | No |
Panels
| Key | Panel | Description |
|---|---|---|
1 |
CPU | Per-core utilization with sparklines |
2 |
Memory | RAM/Swap with usage graphs |
3 |
Disk | Mount points, I/O rates, entropy analysis |
4 |
Network | RX/TX throughput per interface |
5 |
Process | Sortable table with tree view |
6 |
GPU | NVIDIA/AMD/Apple utilization and memory |
7 |
Battery | Charge level and time remaining |
8 |
Sensors | Temperature readings with health status |
9 |
Files | Large files, duplicates, treemap visualization |
Advanced Features
PSI Pressure: CPU ○ 2.1% MEM ○ 0.0% I/O ◔ 1.5%
Containers: ▶ 5.2% 512M web-app
Connections: ESTAB TCP nginx → 192.168.1.100:443
File Treemap: Pareto-style large file visualization
Platform Support
| Platform | CPU | Memory | Disk | Network | GPU |
|---|---|---|---|---|---|
| Linux | ✓ | ✓ | ✓ | ✓ | NVIDIA/AMD |
| macOS Intel | ✓ | ✓ | ✓ | ✓ | AMD Radeon |
| macOS Apple Silicon | ✓ | ✓ | ✓ | ✓ | Apple GPU |
trueno-viz Library
Installation
[]
= "0.2"
# With GPU acceleration
= { = "0.2", = ["gpu"] }
# With system monitoring (powers ttop)
= { = "0.2", = ["monitor"] }
Quick Start
use *;
use ;
let plot = new
.x
.y
.build?;
let fb = plot.to_framebuffer?;
new
.mode
.print;
Plot Types
- Scatter - Point clouds with regression lines
- Line - Time series and trends
- Histogram - Distribution analysis
- Heatmap - Correlation matrices
- Box/Violin - Statistical distributions
- ROC/PR - ML model evaluation
- Confusion Matrix - Classification results
- Loss Curves - Training visualization
Output Formats
| Format | Use Case |
|---|---|
| PNG | Reports, dashboards |
| SVG | Web, scalable graphics |
| Terminal (ASCII) | SSH, CI logs |
| Terminal (Unicode) | Rich TUI displays |
| Terminal (ANSI 24-bit) | Full color terminals |
SIMD Collectors
Real platform intrinsics for system monitoring (v0.1.14+):
┌─────────────────────────────────────────────────────────────┐
│ SSE2/AVX2 (x86_64) │ std::arch::x86_64 intrinsics │
│ NEON (aarch64) │ std::arch::aarch64 intrinsics │
│ 5.6x measured speedup │ Byte scanning operations │
└─────────────────────────────────────────────────────────────┘
Three-Tier Storage
Hot → SimdRingBuffer (O(1) statistics)
Warm → Compressed (LZ4 in-memory)
Cold → Disk (Persistent history)
Performance
| Operation | Speedup | Implementation |
|---|---|---|
| Byte scanning | 5.6x | SSE2 _mm_cmpeq_epi8 |
| Delta calculation | 2-3x | AVX2 _mm256_sub_epi64 |
| Statistics | 2-4x | AVX2 reductions |
| Ring buffer stats | O(1) | Running aggregates |
Examples
# ttop - system monitor
&&
# Visualization examples
# All examples
Architecture
trueno-viz/
├── src/
│ ├── framebuffer.rs # SIMD-aligned pixel buffer (64-byte AVX-512)
│ ├── plots/ # Scatter, Line, Heatmap, Histogram, etc.
│ ├── grammar/ # Grammar of Graphics (ggplot-style API)
│ ├── output/ # PNG, SVG, Terminal encoders
│ └── monitor/ # System monitoring (feature: monitor)
│ └── simd/ # Real SIMD kernels
│ ├── kernels.rs # Platform intrinsics
│ ├── ring_buffer.rs # O(1) statistics
│ ├── timeseries.rs # Three-tier storage
│ └── correlation.rs # Pearson correlation
└── crates/
└── ttop/ # System monitor binary (10X better than btop)
Testing
Property-based tests cover framebuffer operations, SIMD kernel correctness, and plot rendering invariants.
Documentation
- API Documentation - Complete API reference
- The Visualization Guide - mdBook with tutorials
- ttop README - System monitor documentation
- Examples - Runnable code samples
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md guide for details.
MSRV
Minimum Supported Rust Version: 1.75
See Also
- Cookbook — 18 runnable examples
License
MIT OR Apache-2.0
Part of the Aprender monorepo — 70 workspace crates.