-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: split to create a library #62
Conversation
@KSXGitHub , do you feel this might be possible ? |
fwiw, I have developed a few other |
Technically possible. I have created plenty of Rust projects (not related to pnpm) that is both a library crate and a binary crate. All you have to do is to define both |
I believe this isnt necessary unless there are attributes needed to describe them. i.e.
|
318eee9
to
935f9b2
Compare
Why is a lib needed? Maintaining a library along with the CLI creates more work for us. |
See earlier comment #62 (comment) I would like to use |
Thanks for approving. It would be a good idea to follow this up with adding a header to the lib.rs to indicate that it is unstable, e.g. https://github.com/simonbuchan/pnpm-extra/blob/main/src/lib.rs , and maybe even hide it from the rust docs , e.g. https://github.com/Electron100/butane/blob/master/butane_cli/src/lib.rs |
Not the cleanest split; happy to revise.
And also happy for this to not be published until it goes through a few more revisions to clean it up to produce a sensible API. (e.g. MainError probably doesnt belong in the lib)