suckit
suckit copied to clipboard
Library Binary Pattern
Tracking Patch-Set
- [x] Initial lib-bin split (files) #141
- [ ] Move panics off library (snafu / anyhow / thiserror, quick_error)
- [ ] Move bin-tests (under tests/) to use library (w/ httpmock) sans exec(bin)
- [ ] Args parsing into binary
- [ ] Output formatting into binary?
- [ ] Create doctests for example uses of binary in README.md and include with doc_comment
Intent
@CohenArthur @Skallwar Are you okay if I change to lib-bin pattern from binary only now?
Essentially I would split all the library logic to library and binary that requires different things e.g. for shell related libraries.
This is a common pattern and will make organising code, benches, testing and dependency management easier between two sets of needs among other things.
Also common pattern is that library will never panic whilst binary may panic but idea is to propagate errors to binary.
Yup, this is a really good idea. This is something that we had thought about earlier, but never got around to doing. I'd love to see it implemented.
@CohenArthur @Skallwar initial lib-bin split is #141
Add a checkbox list to this issue to make it a tracking issue of the patch-set
I would also like to see the argument parsing moved to the bin
Hi @pinkforest, I hope you are doing well. I was wondering if you are not planing to followup on this or if you are just taking a break?