Replies: 1 comment 2 replies
-
I can't recall the exact downside (only that there was one annoying one). I've often seen people add a secondary crate - e.g. XXX-cli for this sort of thing. Off the top of my head, there's no easy way to make the libs for the binary only affect the binary and not the crate. That's possibly not the exact problem, but it's something like that. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea is:
This will install a binary that displays a Ratatui tutorial in the terminal when you run it. The binary can be called
ratatui
orratatui-tutorial
(orratatutorial
lol) and it will be also built with Ratatui.i.e.
vimtutor
but for RatatuiFor that, we can simply render our docs (markdown files) and make them browsable in the terminal.
When it comes to the
cargo install
command we just need to addmain.rs
file to the repo for cargo to locate the binary to install. I'm not sure if there are any downsides to having both lib and binary in the same crate.Thanks @mre for the idea!
Beta Was this translation helpful? Give feedback.
All reactions