wasi-libc icon indicating copy to clipboard operation
wasi-libc copied to clipboard

WASI libc implementation for WebAssembly

Results 90 wasi-libc issues
Sort by recently updated
recently updated
newest added

~~This patch series first starts with a number of commits stubbing out functions in the existing `THREAD_model=posix` code. According to "The Open Group Base Specifications Issue 7, 2018 edition", there...

This is one part of breaking up #518 into smaller PRs. This should be (IMO) the least-controversial batch of commits

Hello, I compiled wasi-libc using clang-17 and it produced a sysroot that only includes wasm32-wasi. Is it possible to get a sysroot for wasm64-wasi? For instance, apt.llvm.org references a libclang-rt-17-dev-wasm64...

Probably one of the biggest headaches in keeping CPython compatible with WASI is tracking the stubs that suddenly turn on "new" functionality thanks to `configure` discovering the new symbol. Having...

[This line](https://github.com/WebAssembly/wasi-libc/blob/b9e15a8af930603183eb13af62e193de0f9f9ee3/Makefile#L767-L768) in the header file is quite large and can quickly run into command line length limits on Windows. I've debugged this a few times on wasi-sdk PRs now...

... since it doesn't have `CLOCK_PROCESS_CPUTIME_ID` or `CLOCK_THREAD_CPUTIME_ID`. I was compiling w2c2 to Wasm and discovered that it does not because of these lines: https://github.com/turbolent/w2c2/blob/22a9adeef081714e0d07ea62aa0ec734c6a5f99f/wasi/wasi.c#L2027-L2038 POSIX seems to pretty clearly...

As part of the WASIp2 work, I changed the Makefile to produce a separate `include` directory for each target, only adding a pthread.h to the `wasm32-wasi-threads` one (and its `wasm32-wasip1-threads`...

`fcntl` doesn't implement `O_NONBLOCK` for `wasi:socket` handles See https://github.com/WebAssembly/wasi-libc/blob/1b19fc65ad84b223876c50dd4fcd7d5a08c311dc/libc-bottom-half/cloudlibc/src/libc/fcntl/fcntl.c#L10-L61

https://github.com/WebAssembly/wasi-libc/blob/7d4d3b83fc66c79b3faa5989e67ed2d1042dacaf/libc-bottom-half/cloudlibc/src/libc/sys/ioctl/ioctl.c#L22-L37

`__wasi_sockets_utils__map_error` is missing conversion for `NETWORK_ERROR_CODE_INVALID_STATE` for `connect` in `wasi:socket` ## Test case `TcpClientSocket_WhenBoundToWildcardAddress_LocalEPChangeToSpecificOnConnect` https://github.com/dotnet/runtime/blob/89f245e722eda87869dbb04690cb91361af8174c/src/libraries/System.Net.Sockets/tests/FunctionalTests/LocalEndPointTest.cs#L82-L103 Place to fix https://github.com/WebAssembly/wasi-libc/blob/7d4d3b83fc66c79b3faa5989e67ed2d1042dacaf/libc-bottom-half/sources/sockets_utils.c#L20-L22 Log ``` info: [STRT] System.Net.Sockets.Tests.LocalEndPointTestIPv4Task.TcpClientSocket_WhenBoundToWildcardAddress_LocalEPChangeToSpecificOnConnect {module="streams" function="[method]output-stream.blocking-write-and-flush"}: wasmtime_wasi::bindings::sync::generated::wasi::io::streams: return result=Ok(()) {module="monotonic-clock"...