Skip to content

Added recipes for curl (libcurl-static)#1332

Closed
anutosh491 wants to merge 2 commits intoemscripten-forge:mainfrom
anutosh491:curl
Closed

Added recipes for curl (libcurl-static)#1332
anutosh491 wants to merge 2 commits intoemscripten-forge:mainfrom
anutosh491:curl

Conversation

@anutosh491
Copy link
Copy Markdown
Collaborator

@anutosh491 anutosh491 commented Sep 24, 2024

We can have 3 outputs here (curl, libcurl and libcurl-static). I guess we would not need the first two.

@anutosh491 anutosh491 marked this pull request as draft September 24, 2024 08:29
@anutosh491
Copy link
Copy Markdown
Collaborator Author

anutosh491 commented Sep 24, 2024

Need to

  1. Add tests
  2. look into the required configuration flags (a couple might be unncessary)
  3. Not all file maybe necessary, so I guess we can select the ones we want.

@anutosh491
Copy link
Copy Markdown
Collaborator Author

anutosh491 commented Sep 24, 2024

I did this for supporting magics in xeus-cpp but thinking about it, having libcurl would help us compile the RCurl R package (cc @IsabelParedes might be interested here)

@anutosh491 anutosh491 marked this pull request as ready for review September 24, 2024 10:03
@DerThorsten
Copy link
Copy Markdown
Contributor

DerThorsten commented Sep 24, 2024

curl will very likely not work in the browser (tempted to close this PR)

@DerThorsten DerThorsten reopened this Sep 24, 2024
@anutosh491
Copy link
Copy Markdown
Collaborator Author

anutosh491 commented Sep 24, 2024

curl will very likely not work in the browser (tempted to close this PR)

I had my doubts but then I saw curl being used in wasm at few resources

  1. https://curl.se/download.html (its through wasix, so search for wasix)
  2. https://github.com/wapm-packages/curl
  3. Duplicate symbols when compiling for wasm with emscripten curl/curl#13018 (comment)

And the xeus-cpp use case was just blocked since a while so I thought of raising it and this recipe is only for libcurl-static (not for the other 2 components which are curl and libcurl). Let me know what you think.

@DerThorsten
Copy link
Copy Markdown
Contributor

curl will very likely not work in the browser (tempted to close this PR)

I had my doubts but then I saw curl being used in wasm at few resources

  1. https://curl.se/download.html (its through wasix, so search for wasix)
  2. https://github.com/wapm-packages/curl
  3. Duplicate symbols when compiling for wasm with emscripten curl/curl#13018 (comment)

And the xeus-cpp use case was just blocked since a while so I thought of raising it and this recipe is only for libcurl-static (not for the other 2 components which are curl and libcurl). Let me know what you think.

So while compiling curl is possible I doubt that anything meaningful will work for the browser.
This can work for wasi / wasix or other platforms when they emulate the appropriate syscalls, but in the browser you will need to use async APIs for downloading things (ie the fetch API ).
If there is no dedicated code in the curl codebase to handle emscripten, this will not work to download things

@anutosh491
Copy link
Copy Markdown
Collaborator Author

Thanks for the explanation here @tharun571 why exactly do we use curl in xeus-cpp. Cause I guess the above confirms we might not be able to use it.

@tharun571
Copy link
Copy Markdown

@anutosh491 I am using curl to call the LLMs in xeus-cpp. As mentioned above, fetch API might be something I will try for our project.

@anutosh491
Copy link
Copy Markdown
Collaborator Author

Closing as won't work.

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.

4 participants