How to build .bc file for embedding libcurl library?

799 views
Skip to first unread message

Mattia Manzati

unread,
Dec 1, 2013, 1:46:50 PM12/1/13
to emscripte...@googlegroups.com
Hi all,
I am trying to build with emscripten a program which depends on libcurl, but I have not understand how I should build libcurl in order to succefully compile the program.

I've tryed to download libcurl sources and run
emconfigure configure
emmake make
emmake install

but I could'nt find any js file. So after reading a bit of docs i've found that I have to compile libcurl as .bc file, how can I do it?
And after I have compiled it as bc file, how can I embed it in the programs makefile in order to properly compile and work?

Thanks for any help! :)

Alon Zakai

unread,
Dec 1, 2013, 11:08:24 PM12/1/13
to emscripte...@googlegroups.com
emmake make should build sources to bitcode. The final library might have suffix .so or .a or such, but will contain bitcode (run `file` on it for example, to see). You can then link that with your other project and compile the result as a whole to JS.

For more info see https://github.com/kripken/emscripten/wiki/Building-Projects

- Alon



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

LCID Fire

unread,
Dec 4, 2013, 9:23:31 AM12/4/13
to emscripte...@googlegroups.com
Be aware that libcurl is largely synchronous, while most of Javascript requires async handling.

Ilya Kantor

unread,
Feb 19, 2023, 3:51:54 AM2/19/23
to emscripten-discuss
Also trying to build an app with `-lcurl`.

Any good outcome from your past efforts?
Or maybe someone else could share their success?

Floh

unread,
Feb 19, 2023, 8:08:07 AM2/19/23
to emscripten-discuss
How likely is it even to succeed with building and running libcurl for a WASM target? Has anything substantially changed since this ticket was written: https://github.com/emscripten-core/emscripten/issues/4642?

...e.g. AFAIK libcurl largely depends on native APIs that are either not available in the browser or node.js, or behave differently (like the sockets wrapper), don't know though how closely WASI maps the required POSIX APIs.

Reply all
Reply to author
Forward
0 new messages