Hi everyone, currently all my code is in one file (main.rs). I don't really understand Cargo's module system, what should go in which file? Thanks in advance. (This is my first real project in Rust)
https://github.com/benmanone/minicloze
#How should I split my codebase into different files [~250 LOC]
7 messages · Page 1 of 1 (latest)
i think your project is small enough that it's good enough as is
a projects grow larger, they'll naturally grow to have different components
however, i do think it's notable that a lot of the comments you have are rather useless
oh nice, thanks. i wasn't sure if all structs should go in a header file or something like that
they say the exact same things the code does
that's explicitly discouraged. they should be with the code that works with those structs, not stuffed in a corner to rot.