rust-lang / socket2

Advanced configuration options for sockets.

Home Page:https://docs.rs/socket2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Possible to support architectures that only provide the `std::net` interface (and only TCP)?

DragonDev1906 opened this issue · comments

Hello, would it be possible to support OS/architectures that do not provide much in terms of low-level control for socket creation/configuration, but provide the std::net interface, (and that only for TCP)?
For example the x86_64-fortanix-unknown-sgx target. At the moment any crate that depends on socket2 for OS independent (for example tokio with the net feature or hyper) cannot be compiled for this target. I've not looked far into the details how socket2 works, hence this question of feasibility. Compiling for this target works in the CI, so this could (in theory) be a Tier2 target.

Just a side-note: x86_64-fortanix-unknown-sgx intentionally does not support low-level control over sockets because the Enclave (Trusted Execution Environment) cannot really control those anyways and is relying on the (untrusted) host for that.

I think we can add the code to ensure that it compiles at least, but I don't think we can personally officially support it, unless you (or some else) is willing to commit to maintaining it.

@DragonDev1906 any follow up to this, or can this be closed?

Can be closed. Sorry for not responding earlier, I wasn't sure if you intentionally wanted to keep this open.

Can be closed. Sorry for not responding earlier, I wasn't sure if you intentionally wanted to keep this open.

If you (or anyone else) have concrete plans to support x86_64-fortanix-unknown-sgx then I'm ok with keeping it open, or opening a more concrete issue for that. But I don't find much value in keeping a "wish list" issue open.