vision-rs / Getting Started
Installation & Toolchain
Prerequisites
- OS: Ubuntu — the only supported development/build platform today.
- Rust: the latest stable toolchain via rustup.
- CUDA Toolkit 13.3 or later on the host — required for the
cudafeature (on by default) and for ahead-of-time kernel compilation. - This crate’s sibling repo, checked out next to
vision-rs:git clone https://github.com/teenygrad/teenygrad ../teenygradvision-rs’sCargo.tomlpatchesteeny-*crates to../teenygrad/...via[patch.crates-io], and cross builds auto-mount that workspace root. - Only if cross-compiling/deploying to a Jetson Orin Nano:
cross, Docker, theaarch64-unknown-linux-gnurustup target,cargo-teeny, and SSH/rsyncaccess to the device — see Cross-Compilation.
Clone and configure
git clone https://github.com/teenygrad/vision-rs
cd vision-rs
cp .env.dev .env # then edit the paths inside for your machine
The teenyc compiler
vision-rs itself builds against stable Rust, but its GPU kernels
(Triton-DSL, compiled to PTX/MLIR) go through a separate, custom compiler
fork: teenyc. You need it on your machine, with TEENYC_PATH (set in
.env) pointing at it, before building or running anything that uses the
cuda feature (on by default).
The supported way to get it is via
cargo-teeny, which installs a
prebuilt release — you do not need to clone or build the teeny
compiler fork from source:
cargo install --git https://github.com/teenygrad/cargo-teeny
cargo teeny install-toolchain
This links the compiler as stable-teenyc-x86_64-unknown-linux-gnu under
~/.rustup/toolchains/. Verify it:
rustup toolchain list | grep teeny
rustup run stable-teenyc-x86_64-unknown-linux-gnu teenyc --version
.env.dev already points TEENYC_PATH at the right place once installed
this way. source .env in every shell before building/running/testing —
the test suite and examples compile kernels via teenyc at runtime.
Build
source .env
cargo build --release
cargo test
See Custom Kernels for how the kernel compilation pipeline fits together, and Building for Jetson Orin Nano for cross-compilation.