#How should I split my codebase into different files [~250 LOC]

7 messages · Page 1 of 1 (latest)

lusty peak
#

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

GitHub

Rust-based command-line language-learning game. Uses the Tatoeba database. - GitHub - benmanone/minicloze: Rust-based command-line language-learning game. Uses the Tatoeba database.

mild prism
#

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

lusty peak
#

oh nice, thanks. i wasn't sure if all structs should go in a header file or something like that

mild prism
#

they say the exact same things the code does

mild prism