There are a few I’m aware of:
- Rust-style
use(multiple imports per statement, renaming items usingas) - Java-style
import(single import per statement, no renaming (afaik)) - Zig-style
let xlib =(imports as assignments) - C-style
(no importing, just pastes the code of the named file)


It’s actually pretty similar to rust, only that rust can import multiple modules (namespaces) in one line, which is just syntax sugar, and the syntax is slightly different.
Your example would be
use my_projext::domain::entities; use my_project::api::contracts::routes::http as routes;Rust adds the curly brace syntax so you can import a specific subset from a module, but I can’t decide if I like that. In C# you just keep adding extra lines which take up more vertical space, but if you sort your using a alphabetically (which your IDE can do), I think you get a very readable list. In sum, Rust adds a feature that I don’t really actually like.