How do you organize Rust modules?

View other answers to this thread
Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

Marco Alka's photo

It's so confusing to have multiple files open in the IDE, and I'd love to give them better names. However, it seems I somehow missed this new feature and I cannot find anything on the internet (though I also have to say that finding information on file hierarchy in Rust is a problem on its own...). Can you send me a link?

Even though I'd gladly use it, I think that the new alternative has a number of downsides:

  • When viewing the file and directory in a file explorer, they might be visually separated, which adds to confusion.
  • The module files might get mixed up with other regular files and it is difficult to tell them apart.

However, I think that a good IDE should somehow bring the files and folders back together. Maybe just display modules instead of actual files.

Mark's photo

Yeah I found it while searching searching some error messages I got while upgrading. Took a while to find back, but here it is: (along with the other changes)