Skip to content
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

Publish to crates.io to support cargo-run-bin workflow #392

Closed
dlight opened this issue Aug 27, 2023 · 2 comments
Closed

Publish to crates.io to support cargo-run-bin workflow #392

dlight opened this issue Aug 27, 2023 · 2 comments

Comments

@dlight
Copy link

dlight commented Aug 27, 2023

Prisma-client-rust's CLI tool currently builds as a crate inside your workspace, so that different projects can use different versions of the tool. Because of that, it isn't published on crates.io and cargo install doesn't work for it.

However, this means that the CLI tool each project must be rebuilt separately (even if they share the same version), which also wastes space in the target/ directory of each project.

There's a new tool called cargo-run-bin that is able to share the same binary between multiple projects (if they have the same version), but otherwise let's you specify, in a certain section of Cargo.toml, the specific version of the CLI tool used for each project. This addresses prisma-client-rust's concerns, but avoid compiling the same tool over and over again and avoid wasting space.

For example, if you have five projects using prisma-client-rust's 0.6.9 and one project still on 0.5.3, cargo-run-bin would need to install just two versions of the CLI tool, shared between the six projects.

But if this is to be used, I think that prisma-client-rust should be published on crates.io. I think it's enough to write down in the readme that installing with bare cargo install is not recommended, and that either cargo-run-bin or continuing to have a crate in the project is preferred (both can be supported)

@Brendonovich
Copy link
Owner

As I've already stated in #307 and #76, I can't publish PCR to crates.io. If cargo-run-bin supports git dependencies then we can investigate it, but crates.io is not an option.

@dlight
Copy link
Author

dlight commented Aug 27, 2023

Yikes, I forgot I had already opened an identical issue, sorry 😅

@dlight dlight closed this as completed Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants