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

Define and document the code style and module structure. #4

Open
eddyb opened this issue Oct 15, 2013 · 1 comment
Open

Define and document the code style and module structure. #4

eddyb opened this issue Oct 15, 2013 · 1 comment

Comments

@eddyb
Copy link
Contributor

eddyb commented Oct 15, 2013

Inconsistency should be avoided where possible.

Rust itself uses UpperCamelCase for non-primitive type names and traits, while the current code base has a few structures using lowercasewithnospaces.

For the module structure, for example, io/x86 is preffered over arch/x86/io, and allows for easy automatic import:

// in io/mod.rs:
#[cfg(arch="x86")]
pub use x86::*;
// everything exported by io/x86.rs or io/x86/mod.rs shows up in io.
@miselin
Copy link
Owner

miselin commented Jul 18, 2014

The compiler is now firing warnings for things like non-CamelCase type names - hopefully that will help clean these up.

I agree that the module structure should be documented. I am not hugely concerned about the layout - I would like to one day add additional targets (other than pure 32-bit x86) so having a module layout that can cater to that will be important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants