What it does
PyTorch is one of the most widely used tools for building and running AI models. tch-rs is a thin bridge that lets programs written in Rust, a fast and safe programming language, use PyTorch's core engine.
It stays close to PyTorch's own C++ interface, so other, more Rust-friendly tools can be built on top. It needs the PyTorch C++ library on your computer, which it can download automatically.
Who it's for
Rust developers who want to train or run AI models.
Can I use it without coding?
Developers only. It is a code library for Rust programmers. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- Computer
- An ordinary computer is fine
- Privacy
- Runs on your own device: your data stays with you
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (Apache-2.0): Permissive: free to use, change and share, including for business.
- More on staying safe