Skip to content

[Feature request] Make networking support optional #642

Description

@andy0130tw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions