Category: Lab Journal Tags: Rust, Programming, Burn, WGPU
Today I ran my first build with Burn, a deep learning framework written in Rust. This isn’t a deep dive — that’s coming in a separate post on why Burn’s backend architecture matters. This is just the log: what I ran, what happened, what I learned from watching it work.
The Setup
I’ve been exploring Rust → Leptos → WebAssembly → Axum as a stack, and Burn adds another dimension I wanted to try: Rust → Deep Learning.
For the first project, I went with the WGPU backend — the same one used in Burn’s official getting-started example:
cargo add burn --features wgpu
WGPU caught my attention because it provides cross-platform GPU access — it can work across Vulkan, Metal, DirectX, and WebGPU, rather than locking me into one hardware path. For someone just getting oriented in the Burn ecosystem, that felt like the safer first choice over something like LibTorch or CUDA-specific backends.
The Test
After compiling Burn 0.21.0, I ran a basic tensor operation. It produced:
[[3.0, 4.0], [5.0, 6.0]]
with the backend confirmed as:
backend: "fusion<cubecl<wgpu<wgsl>>>"
That backend string is worth pausing on. It’s not just “it compiled” — the naming shows Burn actually routed the computation through its fusion layer, into CubeCL, down to WGPU, compiled to WGSL shader code, and executed. That’s a real GPU-backed tensor op, not a stub.
What I Learned
- The gap between “Cargo build succeeds” and “the computation actually ran on the intended backend” is real, and Burn’s verbose backend string is a nice way to confirm you’re not accidentally running on a fallback.
- Getting a working tensor op on the first real attempt was satisfying, but I want to be honest that this was the simplest possible test — two tensors, one op. The real learning starts once I try training something.
Next Up
Per my Burn learning path, the next stages are:
- Rust fundamentals (done, ongoing)
- Burn tensors ← just did this
- Neural-network basics
- Automatic differentiation
- Build a small model
I’ll log each stage here as I go.