Modern Rust Project Layouts

⚓ Rust    📅 2025-12-16    👤 surdeus    👁️ 1      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Modern Rust Project Layouts

I'm newish to Rust and am confused about which project layout structure to use based on what I've been seeing in newer Rust projects. I've seen basically three setups:

  1. Everything in /crates and using a workspace.
  2. Main app in /src, everything else in /crates.
  3. Main app in /src, everything else as a submodule inside of /src.

Most of the new projects seem to be using #1 now, even for what I would consider to be smaller projects. Is there a reason why one would want to use one of these approaches over the other?

4 posts - 3 participants

Read full topic

🏷️ Rust_feed