Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module/code organization #212

Open
fade2black opened this issue Jan 23, 2021 · 5 comments
Open

Module/code organization #212

fade2black opened this issue Jan 23, 2021 · 5 comments
Labels
A-pattern Area: Content about Patterns C-addition Category: Adding new content, something that didn't exist in the repository before good first issue Good for newcomers
Projects

Comments

@fade2black
Copy link
Contributor

fade2black commented Jan 23, 2021

cargo new already creates a structured project (folders, etc...).
Wouldn't be it nice to create a section/page/idioms/ devoted to best practices of code organisation? For example how to struct modules, crates, workspaces...how to refer one crate from another or one module from another.
What do you think?

@MarcoIeni
Copy link
Collaborator

Do you mean cargo new, right?
We could cover the use of mod.rs, because if I remember correctly the rust book doesn't cover that

@fade2black
Copy link
Contributor Author

@MarcoIeni Yeah, right,cargo, fixed. 😊

@simonsan simonsan added C-addition Category: Adding new content, something that didn't exist in the repository before good first issue Good for newcomers A-pattern Area: Content about Patterns labels Jan 23, 2021
@simonsan simonsan added this to ToDo-Patterns in Content Jan 23, 2021
@simonsan simonsan changed the title Rust code organization Module/code organization Jan 23, 2021
@simonsan
Copy link
Collaborator

Good post about it:
https://www.sheshbabu.com/posts/rust-module-system/

@MarcoIeni
Copy link
Collaborator

Should this be an idiom?

@simonsan
Copy link
Collaborator

simonsan commented Feb 22, 2021

We could also include a example using cargo generate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pattern Area: Content about Patterns C-addition Category: Adding new content, something that didn't exist in the repository before good first issue Good for newcomers
Projects
Content
ToDo-Patterns
Development

No branches or pull requests

3 participants