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

Replace binary-install #24

Closed
ebadta81 opened this issue Dec 2, 2022 · 6 comments
Closed

Replace binary-install #24

ebadta81 opened this issue Dec 2, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@ebadta81
Copy link

ebadta81 commented Dec 2, 2022

Hello Henrik,

when I do cargo leptos build -r I got:

    Finished release [optimized] target(s) in 18.61s
       Cargo finished cargo build --no-default-features --features=hydrate --lib --target=wasm32-unknown-unknown --release
Error: at `src/main.rs@147:33`

Caused by:
    0: at `src/main.rs@163:36`
    1: at `src/run/wasm.rs@20:34`
    2: at `src/run/wasm.rs@52:41`
    3: at `src/run/wasm.rs@77:35`
    4: Unable to download wasm-opt for macos aarch64 due to: failed to extract tarball from https://github.com/WebAssembly/binaryen/releases/download/version_111/binaryen-version_111-arm64-macos.tar.gz

I installed the latest cargo-leptos, and without -r, the build woks.

@akesson
Copy link
Collaborator

akesson commented Dec 2, 2022

Ok, I can reproduce it. I'm using the binary-install crate for it and it works really poorly. I'll need to replace it. I'll change the title to reflect that.

As a workaround do brew install binaryen and make sure that wasm-opt runs on the command line.

@akesson akesson changed the title build in release mode failed on macos Replace binary-install Dec 2, 2022
@akesson akesson added the bug Something isn't working label Dec 2, 2022
@akesson
Copy link
Collaborator

akesson commented Dec 2, 2022

Related to #21

@michalvavra
Copy link
Contributor

michalvavra commented Dec 2, 2022

I would suggest to look at something that is using reqwest instead of curl (binary-install is using it).


TLDR;

After a couple of hours of debugging, I found out that the underlying problem is curl crate (used by binary-install).

I’ve tried many things on Windows:

I wasn’t able to download a binary from Windows. Directly via curl command or curl crate.
It’s something between the curl and Windows SLL certificate that is the problem.

reqwest downloads GitHub binaries without problem for me.

@akesson
Copy link
Collaborator

akesson commented Dec 2, 2022

Oh, fantastic! A great help, thanks a lot!!!

@michalvavra
Copy link
Contributor

I can take over this one. I haven't found any binary-install alternative.
But I have now working prototype on Windows (using reqwest).

It needs a bit of polishing and testing but I can deliver the PR over the weekend.

@akesson
Copy link
Collaborator

akesson commented Dec 2, 2022

Great. Go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants