2 unstable releases
Uses new Rust 2024
| 0.2.0 | Oct 27, 2025 |
|---|---|
| 0.1.1 | Sep 20, 2025 |
| 0.1.0 |
|
#1115 in Math
Used in 7 crates
220KB
4.5K
SLoC
stensor − cross-platform GPU tensor library with Rust and Slang
The goal of stensor (pronounced s-tensor, aka, Slang tensor) is to essentially be "nalgebra on the gpu". It aims (but it isn’t there yet) to expose linear algebra operations (including BLAS-like and LAPACK-like operations) as well as geometric types (quaternions, similarities, etc.) as Slang shaders and kernels.
Warning stensor is still very incomplete and under heavy development and is lacking many features.
See also the README of slang-hal for information on supported platforms.
Using Slang
In order to compile and run any slang project, be sure to define the SLANG_DIR environment variable:
- Download the Slang compiler libraries for your platform: https://github.com/shader-slang/slang/releases/tag/v2025.16
- Unzip the downloaded directory, and use its path as value to the
SLANG_DIRenvironment variable:SLANG_DIR=/path/to/slang. Note that the variable must point to the root of the slang installation (i.e. the directory that containsbinandlib). We recommend adding that as a system-wide environment variables so that it also becomes available to your IDE.
Dependencies
~20–32MB
~620K SLoC