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

Any resources on how to compile software with dependency? #313

Open
zyongye opened this issue Aug 19, 2020 · 3 comments
Open

Any resources on how to compile software with dependency? #313

zyongye opened this issue Aug 19, 2020 · 3 comments

Comments

@zyongye
Copy link

zyongye commented Aug 19, 2020

Is there a recommended workflow for compile software with library dependencies, all written in C. I have a project, which can be compiled with autotools and a library, libevent, which can be compiled using autotools or cmake. I first use emscripten to compile the libevent using emconfigure and emmake to generate .wasm files. Since the software using socket so I want to link the library to the existing source code. I was stuck here so is there any solution for that?

@pchickey
Copy link
Contributor

Sockets are not available in WASI yet, but there is a proposal in #312 that will likely be merged and available in runtimes in the near future.

I'm not aware of a WASI version of emconfigure/emmake, or if those will target WASI.

@chjj
Copy link

chjj commented Aug 30, 2020

@zyongye, I've written wasi-configure, wasi-make, and wasi-cmake scripts for some of my own projects: https://github.com/bcoin-org/libtorsion/tree/master/scripts . They mimic the emscripten scripts emconfigure, emmake, etc.

@sunfishcode
Copy link
Member

@chjj Those scripts look useful! Would you be interested in having those scripts be hosted in the wasi-sdk repo?

In general we want to focus on getting the functionality we need in upstream clang (done), config (done) and cmake (not yet) directly rather than relying on scripts, but in the case of something like config.sub for example, we've already upstreamed the change, but not everyone has it yet, so the script which updates config.sub looks useful.

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

No branches or pull requests

4 participants