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

feat: add all-static feature #1287

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Conversation

hack3ric
Copy link
Contributor

This adds the ability to build against system libraries like libgit2 and OpenSSL, when the feature is not present.

@orhun
Copy link
Contributor

orhun commented Feb 22, 2024

@MarcoIeni
Copy link
Owner

Thanks for the contribution! I'm happy to accept it. I'll think a bit about the name of the feature.

So on arch linux, by default the release-plz binary will use the system libraries such as git2 and openssl, right?
Is this a policy of all arch linux packages?

@@ -14,13 +14,14 @@ categories = ["command-line-utilities", "development-tools"]
workspace = true

[features]
default = ["docker-tests"]
default = ["docker-tests", "cargo-vendored-libs"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's call this feature all-static, to follow cargo convention :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

This adds the ability to build against system libraries like libgit2 and OpenSSL, when the feature is not present.
@hack3ric hack3ric changed the title feat: add cargo-vendored-libs feature feat: add all-static feature Feb 23, 2024
@hack3ric
Copy link
Contributor Author

So on arch linux, by default the release-plz binary will use the system libraries such as git2 and openssl, right?

After this change, yes; previously these libraries were still vendored.

Is this a policy of all arch linux packages?

Packagers generally prefer dynamic libraries for size, build speed and security reasons. I'm not an Arch Linux maintainer, but we can refer to https://www.reddit.com/r/linux/comments/9emwtu/comment/e5qssdz/ where Felix and Levente discussed about the benefits of it from a distro's perspective.

@MarcoIeni
Copy link
Owner

I see, thanks for the explanation, it makes sense :)

By default, I vendor everything so people have fewer issues when running the binary in all various systems. But package maintainers control the dependencies of the binary, so it makes sense to not vendor the other libraries.

Thanks for the contribution 🙏

@MarcoIeni MarcoIeni enabled auto-merge (squash) February 23, 2024 21:57
@MarcoIeni MarcoIeni merged commit 993692c into MarcoIeni:main Feb 23, 2024
13 checks passed
@release-plz release-plz bot mentioned this pull request Feb 23, 2024
@hack3ric hack3ric deleted the vendored-feature branch February 24, 2024 09:00
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

Successfully merging this pull request may close these issues.

3 participants