| Crates.io | flatlude |
| lib.rs | flatlude |
| version | 1.0.0 |
| created_at | 2025-10-28 15:14:08.065203+00 |
| updated_at | 2025-12-11 05:04:44.977018+00 |
| description | Proc-macro for prelude mods. |
| homepage | |
| repository | https://github.com/jellyterra/flatlude.rs |
| max_upload_size | |
| id | 1904929 |
| size | 7,684 |
Organize Rust symbols in module by directory, not by file.
# Cargo.toml
[dependencies]
flatlude = "1.0.0"
// lib.rs | main.rs
flatlude::flatlude!();
// For example, the proc macro generates:
// for src/a.rs
pub mod a;
pub use a::*;
// for src/b/mod.rs
pub mod b;
// mod.rs
use crate::*;
fn example() {
let _ = A::new();
let _ = b::B::new();
}
Each time you create or remove modules from the source tree, you have to trigger rust-analyzer by editing and it will re-run the proc macro.
flatlude::flatlude!();
flatlude::flatlude!(edit);
flatlude::flatlude!(something);
flatlude::flatlude!(to);
flatlude::flatlude!(trigger);
Public domain.