Expand description
§Trueno-Viz
SIMD/GPU/WASM-accelerated visualization library for data science and machine learning.
Built on the trueno core library, trueno-viz provides hardware-accelerated rendering of statistical and scientific visualizations with zero JavaScript/HTML dependencies.
§Features
- Pure Rust: No JavaScript, HTML, or browser dependencies
- Hardware Acceleration: Automatic dispatch to SIMD (SSE2/AVX2/AVX512/NEON), GPU, or WASM
- Grammar of Graphics: Declarative, composable visualization API
- Multiple Outputs: PNG, SVG, and terminal (ASCII/Unicode) rendering
§Quick Start
ⓘ
use trueno_viz::prelude::*;
// Create a scatter plot
let plot = ScatterPlot::new()
.x(&[1.0, 2.0, 3.0, 4.0, 5.0])
.y(&[2.0, 4.0, 1.0, 5.0, 3.0])
.color(Rgba::BLUE)
.build();
// Render to PNG
plot.render_to_file("scatter.png")?;§Feature Flags
gpu: Enable GPU compute accelerationparallel: Enable parallel processing with rayonml: Integration with aprender/entrenar ML librariesgraph: Integration with trueno-graphdb: Integration with trueno-dbterminal: Terminal output supportsvg: SVG output supportfull: All features enabled
§Academic References
This library implements algorithms from peer-reviewed research:
- Wilkinson, L. (2005). The Grammar of Graphics. Springer.
- Wu, X. (1991). “An Efficient Antialiasing Technique.” SIGGRAPH ’91.
- Douglas, D. H., & Peucker, T. K. (1973). Line simplification algorithm.
- Fruchterman, T. M. J., & Reingold, E. M. (1991). Force-directed graph layout.
Re-exports§
Modules§
- accel
- SIMD/GPU acceleration layer. SIMD/GPU acceleration layer.
- color
- Color types and color space conversions. Color types and color space conversions.
- error
- Error types for trueno-viz operations. Error types for trueno-viz operations.
- framebuffer
- Core framebuffer for pixel rendering. Core framebuffer for pixel rendering.
- geometry
- Geometric primitives (points, lines, rectangles). Geometric primitives for visualization.
- grammar
- Grammar of Graphics implementation. Grammar of Graphics implementation.
- interop
- Ecosystem integrations (trueno-db, trueno-graph, aprender). Ecosystem integrations.
- monitor
monitor - TUI monitoring system (btop-like). TUI Monitoring System for trueno-viz.
- output
- Output encoders (PNG, SVG, terminal). Output encoders (PNG, SVG, HTML, terminal).
- plots
- High-level plot types (scatter, heatmap, histogram, etc.). High-level plot types.
- prelude
- Commonly used types and traits for convenient imports.
- prompt
- Text prompt interface for declarative visualization DSL. Text prompt interface for declarative visualization.
- render
- Rendering backends and rasterization. Rendering backends and rasterization.
- scale
- Scale functions for data-to-visual mappings. Scale functions for data-to-visual mappings.
- wasm
wasm - WebAssembly bindings for browser usage. WebAssembly bindings for trueno-viz.
- widgets
- Dashboard widgets for experiment tracking and visualization. Dashboard widgets for experiment tracking and visualization.