tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
26.96k stars 2.48k forks source link

Support for unix abstract sockets #4610

Open hexfusion opened 2 years ago

hexfusion commented 2 years ago

Feature Request

Rust added abstract namespace support recently[1] and adding support for tokio would open up support for tonic[2]. Thanks in advance for your consideration.

[1] https://github.com/rust-lang/rust/pull/85379 [2] https://github.com/hyperium/tonic/issues/966

Darksonn commented 2 years ago

Hmm, this might need to be added to mio first. That said, you can already do this today before support is added to Tokio by using Tokio's from_std function.

gustav3d commented 2 years ago

Sure, it can be done by using an unstable feature, forcing you into nighty :(

The problem is that there is no progression to get https://github.com/rust-lang/rust/issues/85410 into FCP state. I posted an FCP progression question at the issue recently, also offering my - help if possible. but no response, so removed it after a few days. This seem to be a low interest feuture, i can understand that. But its still a nice to have thing :)

Darksonn commented 2 years ago

If nothing else works, it is still possible to create the socket yourself using manual libc calls (possibly via nix) and converting it into a Tokio socket.

Darksonn commented 2 years ago

I'm not sure what UDS crate you're referring to, and whatever it is, it isn't what I suggested.

gustav3d commented 2 years ago

.. i know. i was only elaborating on other options..

On Sun, 15 May 2022 at 21:46, Alice Ryhl @.***> wrote:

I'm not sure what UDS crate you're referring to, and whatever it is, it isn't what I suggested.

— Reply to this email directly, view it on GitHub https://github.com/tokio-rs/tokio/issues/4610#issuecomment-1127010361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABCY4KYUHGQPG22NNRVEUTVKFICTANCNFSM5S7RJTUA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cathay4t commented 12 months ago

The rust lang SocketAddr::from_abstract_name() became stable on 1.70.0. Support this might bump tokio's minimum rust version.

Darksonn commented 12 months ago

It looks like it is available in mio on older rustc versions.