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

Could we do this without compiling cargo as a dependency? #160

Open
gilescope opened this issue May 6, 2020 · 5 comments
Open

Could we do this without compiling cargo as a dependency? #160

gilescope opened this issue May 6, 2020 · 5 comments

Comments

@gilescope
Copy link

Cargo's not the lightest dependency and with it's dependency on openssl it's tricky to build. I know this is a tall order but I'm just wondering if we could shell out to cargo and get it to tell us some of the information without needing to link it in?

I'd totally accept this is in the 'hard' category.

@gilescope
Copy link
Author

Prior art: cargo install cargo-deps
That manages to figure out the dependencies without linking to cargo.

@ChrisGreenaway
Copy link
Collaborator

I don't have a problem with cargo as a dependency other than its dependence on the additional build tools that have to be installed because of OpenSSL.

I prefer using the cargo API rather than interacting via a shelled out process - it's more robust.

If you wanted to make a PR so that our usage of cargo used rustls, thus getting rid of the OpenSSL dependency, that would be interesting.

@ChrisGreenaway
Copy link
Collaborator

How does the cargo-deps project handle this?

@gilescope
Copy link
Author

Hmm not sure cargo-deps takes an official route. I think it manually parses the lock file. I know there's a cargo lock crate one should use if one's going in that direction.
Better yet, https://crates.io/crates/cargo_metadata seems to be the standard way to introspect the output of cargo metadata which seems to have the dependency info in it. I don't know if that's everything that's needed but if so that would dramatically reduce dependencies / build time.

@ChrisGreenaway
Copy link
Collaborator

Worth noting that openssl is an optional dependency for cargo.

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