wasix-org / wasix-libc

wasix libc implementation for WebAssembly
https://wasi.dev
Other
110 stars 18 forks source link

CMake toolchain triple and sysroot #28

Open anuraaga opened 10 months ago

anuraaga commented 10 months ago

I am looking at the prebuilt wasix-sysroot, which I downloaded from the workflow run

https://github.com/wasix-org/wasix-libc/actions/runs/6268266259

I am wondering about two things

I have wasix sdk building first before actually finding this prebuilt sysroot so it's not a big problem for me but I was looking at how I would switch to using the prebuilt sysroot and just wanted to confirm these. Thanks.

/cc @sandervocke

anuraaga commented 10 months ago

BTW, for context here is the repo I've set up for building a wasix toolchain docker image

https://github.com/wasilibs/wasix-sdk

It just takes the prebuilt sysroot from a workflow run and packages in a CMake toolchain definition, though I went ahead and made the modifications related to the two points I asked about. I am currently building libpq_query as a test platform and the image+prebuilt toolchain worked great.

If there is any interest in hosting a docker image here, let me know and I'd be very happy to send a PR with that repo's code and archive it!

anuraaga commented 10 months ago

Another couple of small notes on the current CMake file

SanderVocke commented 10 months ago

Hi @anuraaga,

I contributed the CI script for the pre-built sysroot recently and as a relative outsider. I took a pragmatic approach, with the goal to have something which works and can be improved upon by Wasmer or other contributors. and actually don't know much about the specific topics you raised. So sorry if my answers are not satisfactory!

To be honest, my goals are met with the current sysroot (apart from hoping @wasix-org will make an official release of it, since build artifacts are not stored forever) but it seems your ideas would improve it. Please consider making a pull request!

anuraaga commented 10 months ago

Thanks @SanderVocke! I mainly wanted to double-check since it's my first time diving into this repo. Since it seems like we are on the right page, I will probably send a PR after getting another confirmation on the triple vs directory name issue.

theduke commented 10 months ago

@SanderVocke thanks for providing the extra context here.

@Arshia001 can you respond here?

PS: we hope to publish a release on the repo next week.