Crate name for a library + a tool

⚓ Rust    📅 2025-12-22    👤 surdeus    👁️ 4      

surdeus

I am about to publish a small command-line utility and I separated the project into a library (someone can be interested in using it outside of the tool) and a small binary. I the language was C I would name the library "libabrdump" and the tool "abrdump" but I see that Rust avoids the "lib" prefix in libraries. An option would be to call the library "abrdump" and the application "abrdump-cli" but I'd like to be able to do:

$ cargo install abrdump
$ abrdump [options] ...

and that implies that the name for the executable crate should be "abrdump". Or am I missing something?

There is an "official" naming scheme for projects like this one?

12 posts - 4 participants

Read full topic

🏷️ Rust_feed