Rust organizes code into **packages** (projects with `Cargo.toml`), **crates** (compilable units, binary or library), and **modules** (organize code within crates). Packages manage dependencies, crates provide functionality, and modules ensure structure and scope, promoting reusable and maintainable Rust projects.
- 1Understanding the Distinctions Among Packages, Crates, and Modules in Rust
- 2Creating a Minimal Rust Project with Cargo and Default Package Structure
- 3Defining a Library Crate vs a Binary Crate in Rust
- 4Rust - Exploring the Cargo.toml File: Dependencies, Versions, and Features
- 5Organizing Code with Modules: The mod Keyword in Rust
- 6Using submodules to Split Large Rust Files into Manageable Components
- 7Navigating Visibility: pub vs Private Items in Rust Modules
- 8Understanding Cargo Workspaces for Multi-Crate Projects in Rust
- 9Re-exports and Namespacing Strategies with use in Rust Modules
- 10Rust - Building and Publishing a Rust Crate to crates.io
- 11Adding External Crates to Your Rust Package with Cargo Dependencies
- 12Overriding Dependency Versions in Rust Cargo Projects
- 13Using dev-dependencies for Testing and Benchmarking in Rust
- 14Developing Monorepos with Cargo Workspaces in Rust
- 15Taming Large Codebases: Layering Modules and submodules in Rust
- 16Splitting Code into Separate Files for Clarity in Rust Modules
- 17Creating Custom Paths in Rust with Cargo’s [workspace] Configuration
- 18Handling Feature Flags to Toggle Functionality in Rust Crates
- 19Private Modules: Encapsulation and API Boundaries in Rust
- 20Using #[path] Attributes to Rename or Relocate Rust Modules
- 21Combining Rust’s Module System with Namespaced Enums and Structs
- 22Rust - Introducing Macros Within the Same Crate: mod macros vs Macro Crates
- 23Publishing Versions and Changelogs for Rust Crates on crates.io
- 24Pre-release Versions and SemVer Considerations in Rust Packages
- 25Rust - Working with Git Dependencies in Cargo for Experimental Crates
- 26Overcoming Cyclic Dependencies by Refactoring Rust Modules
- 27Exporting Types and Functions in Rust via Re-exporting Modules
- 28Testing in Rust: Using Integration Tests in a Separate Tests Folder
- 29Running Examples and Benchmarks with Cargo for Rust Projects
- 30Leveraging the Cargo.lock File for Repeatable Builds in Rust
- 31Rust - Pinning Dependencies to Specific Git Revisions in Cargo
- 32Conditional Compilation with Cargo Features in Rust Crates
- 33Handling Platform-Specific Code with cfg Attributes in Rust Modules
- 34Splitting Shared Logic Between Binary and Library Crates in Rust
- 35Refactoring to Library + Binary Crates for Reusability in Rust
- 36Implementing Custom Build Scripts (build.rs) in Rust Packages
- 37Rust - Understanding the cargo publish Workflow and crate Ownership
- 38Configuring Documentation Generation with cargo doc in Rust
- 39Rust - Optimizing Build Times with cargo check for Rapid Development
- 40Using cargo fmt and cargo clippy to Maintain Consistent Rust Code
- 41Rust - Documenting Modules and Crates with Rustdoc Comments
- 42Rust - Managing Version Conflicts Across Multiple Crates in a Workspace
- 43Applying #[macro_use] and #[macro_export] for Macro Crates in Rust
- 44Handling Repetitive Patterns with Submodules and Public APIs in Rust
- 45Stabilizing APIs and Avoiding Breaking Changes in Published Rust Crates
- 46Migrating From Single-File Projects to Modular Structures in Rust
- 47Rust - Utilizing Private Crates in Company-Internal Registries
- 48Exploring Cargo Plugins and Extension Commands for Rust Projects
- 49Best Practices for Structuring Large-Scale Rust Applications with Modules