wasix-org / wasix-libc

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

Expose the epoll support. #32

Closed rodjjo closed 6 months ago

rodjjo commented 8 months ago

What

I was trying to use epoll based on this information here: epoll syscall in WASIX. I saw that wasmer had the support, however the library does not have.

Why

To allow the use of the epoll routines in C applications.

Description

Here I call the equivalent functions from wasix, so I was able to use epoll in my wasm applications.

I had to pay attention to the different structures and types in order to make it work see. That's why I had to map the enums and the structs correctly.

theduke commented 8 months ago

@rodjjo thanks!

Up to now epoll was only used from the Rust side in the mio / tokio forks, hence why it wasn't in the libc yet.

We'll review soon.

rodjjo commented 8 months ago

image

@john-sharratt I have a Dockerfile in a personal project that compiles wasix libc

I added ./build64.sh there and the build passed (after the changes you requested).

I'm going to create a Dockerfile to build this project in another pull request, so people can build it locally. What do you think ?

rodjjo commented 7 months ago

Hi @john-sharratt hope you're doing well.

I changed it to fix build64.sh, do I need to do anything else ?

Thanks.

syrusakbary commented 6 months ago

Lets merge, thanks for the contribution @rodjjo!