Skip to content

This is not Sans-IO #15

@algesten

Description

@algesten

Hi,

I am out looking for an mDNS implementation suitable for no_std (without alloc crate), when I came across this crate. While I think it is correct to call this code "agnostic" – it is generic over some specific async runtimes – it is not following the regular definition of Sans-IO.

The key point of Sans-IO is to separate the IO concern away from the code. This means concepts like "TcpSocket" or "UdpSocket" should not be internal to the library/component. Here's a great blog post explaining it: https://www.firezone.dev/blog/sans-io

In agnostic there is code that we do not expect to find in Sans-IO. There should be no binding/writing/reading from anything called "socket". Such concerns are abstracted outside of the library:

https://github.com/al8n/agnostic/blob/main/agnostic-dns/src/lib.rs#L234

Here are some examples of Sans-IO libraries in Rust:

Another example is ureq-proto, where I've abstracted the HTTP/1.1 protocol from the actual network code: https://docs.rs/ureq-proto/0.3.0/ureq_proto/client/index.html#example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions