When trying to port Agda Language Server to WebAssembly, a barrier I met was fighting with dependencies to compile this library. This was (and still is) by GHC WASM backend's API limitation: In WASI Preview 1, the standard way of establishing a duplex connection with the host is through preopened file descriptors, either via standard I/O or via BSD-style file descriptors. It was impossible to properly implement libc's network API on top of WASI's syscalls. An early workaround to make the library compile is to stub out all related functions, and is still the approach ALS takes to date.
Now that the library has been refactored to support WebSocket connections, do you consider adding flags for TCP socket and WebSocket support, respectively, so that library consumers can opt-out from network-related transitive dependencies? I can open a PR for review if it seems fit.
edit: Actually the library does not depend on network directly, just transitively via websockets. So it only needs one flag.
When trying to port Agda Language Server to WebAssembly, a barrier I met was fighting with dependencies to compile this library. This was (and still is) by GHC WASM backend's API limitation: In WASI Preview 1, the standard way of establishing a duplex connection with the host is through preopened file descriptors, either via standard I/O or via BSD-style file descriptors. It was impossible to properly implement libc's network API on top of WASI's syscalls. An early workaround to make the library compile is to stub out all related functions, and is still the approach ALS takes to date.
Now that the library has been refactored to support WebSocket connections, do you consider adding flags for
TCP socket andWebSocket support, respectively, so that library consumers can opt-out from network-related transitive dependencies? I can open a PR for review if it seems fit.edit: Actually the library does not depend on
networkdirectly, just transitively viawebsockets. So it only needs one flag.