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

Fixed musl binary download for cargo-generate #166

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

rdbo
Copy link
Contributor

@rdbo rdbo commented Jul 24, 2023

Added detection for Linux targets that use the musl libc on the download of the cargo-generate binary. The current main branch does not do any detection for it, only for SASS.
With this pull request, I managed to get cargo-leptos and leptos itself fully working on Alpine Linux.

@aperepel
Copy link
Collaborator

Leaving a note here to review when #168 is merged, as I did extensive refactoring of the commands there.

@rdbo
Copy link
Contributor Author

rdbo commented Jul 26, 2023

Leaving a note here to review when #168 is merged, as I did extensive refactoring of the commands there.

I could make another PR when yours get merged. Since I use a Linux with musl, I could also test mine and your changes right away.

@aperepel
Copy link
Collaborator

aperepel commented Aug 1, 2023

Hey @rdbo , the #168 has been merged. Feel free to update this PR, the changes will go into the

fn download_url(&self, target_os: &str, target_arch: &str, version: &str) -> Result<String>;
function impls.

I don't have a musl-based linux readily accessible at the moment, but looking over the changes, was wondering - should this logic be applied to other commands, too? Would appreciate if you could check if it applies to other command binaries and update. Thanks!

@rdbo
Copy link
Contributor Author

rdbo commented Aug 2, 2023

There already is a check for SASS for musl, but not for cargo-generate. As for the other binaries, they seem to be statically compiled, since they are very big. I will double check though.
Working on the PR.

@aperepel aperepel merged commit d88602f into leptos-rs:main Aug 2, 2023
3 checks passed
@rdbo
Copy link
Contributor Author

rdbo commented Aug 2, 2023

@aperepel rebased from your changes and added the proper cargo-generate binary download for musl. Everything is fine, I got the leptos-rs/start template to work 👍
As for the other binaries, they are statically linked, so they're the same on glibc and musl.

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.

2 participants