79319594

Date: 2024-12-31 09:17:18
Score: 2
Natty:
Report link

This file structure comes from ratatui: since it's a framework, not just a library, it dictates the file/project structure to stick to (obviously, I understand that I can deviate from it, but not an expert enough to think that "I know better").

Ratatui maintainer here. You're smart enough to deviate. Feel free. My feelings won't be hurt.

Libs and Cli tools in the same crate can be a pain. In particular it's difficult to have dependencies which are just for the cli which you don't want to be included in the lib. You can feature flag them and make them optional, but this is suboptimal for cli tool installation using cargo (as it means that you need to specify feature flags all the time).

The best available approach (at the time of writing end of 2024) is to release two crates my-game and my-game-cli.

See also How can I specify binary-only dependencies?

Reasons:
  • Blacklisted phrase (0.5): How can I
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Joshka