flatlude

Crates.ioflatlude
lib.rsflatlude
version1.0.0
created_at2025-10-28 15:14:08.065203+00
updated_at2025-12-11 05:04:44.977018+00
descriptionProc-macro for prelude mods.
homepage
repositoryhttps://github.com/jellyterra/flatlude.rs
max_upload_size
id1904929
size7,684
Jelly Terra (jellyterra)

documentation

README

flatlude.rs

Organize Rust symbols in module by directory, not by file.

Usage

# 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();
}

rust-analyzer

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);

Licensing

Public domain.

Commit count: 0

cargo fmt