no-std-net icon indicating copy to clipboard operation
no-std-net copied to clipboard

Possibility of implementing this as a facade

Open ryankurte opened this issue 5 years ago • 5 comments

hey, would you be interested in feature-gating this to act as a facade so std would expose the standard library types and not(std) would expose the local crate types? this would make it easier to write libraries that are agnostic over std/no_std, but still work with third party networking components in the std case.

this would be useful prior to https://github.com/rust-lang/rfcs/pull/2832 landing and being implemented, and for types not included in this RFC (SocketAddr etc.)

nominally it would be good to test to ensure each variant provides the same interfaces as part of this (and any variation in interfaces would ideally be resolved, which may be a braking change), but practically introducing the feature-gate without anything else would still help a bunch.

ryankurte avatar Jul 13 '20 03:07 ryankurte

Sorry for the delay on this, somehow the notification email got lost in the churn. I'll give it it the requisite thought tonight and let you know, but from what you've said so far it seems utterly reasonable.

dunmatt avatar Dec 02 '20 14:12 dunmatt

Yeah, I'm on board. Did you want to make the change or shall I?

dunmatt avatar Dec 03 '20 02:12 dunmatt

it's not high up on my list at the moment but, would be super handy. happy to review a PR if it's useful for you / you get there before i do!

ryankurte avatar Dec 03 '20 20:12 ryankurte

What is left of this after #13? (It mentioned it was only partial).

Or is this intended to stay open until the whole crate is a facade (after https://github.com/rust-lang/rust/pull/104265, provided RFC2832 passes)?

chrysn avatar Dec 15 '22 18:12 chrysn

Great question, I'm at work now, I'll have to rebuild context when I get home

On Thu, Dec 15, 2022, 11:38 chrysn @.***> wrote:

What is left of this after #13 https://github.com/dunmatt/no-std-net/pull/13? (It mentioned it was only partial).

Or is this intended to stay open until the whole crate is a facade (after rust-lang/rust#104265 https://github.com/rust-lang/rust/pull/104265, provided RFC2832 https://github.com/rust-lang/rfcs/pull/2832 passes)?

— Reply to this email directly, view it on GitHub https://github.com/dunmatt/no-std-net/issues/5#issuecomment-1353541620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN7S6GBIRCIN5J4LXOUO3WNNQRNANCNFSM4OYEOS6A . You are receiving this because you commented.Message ID: @.***>

dunmatt avatar Dec 15 '22 19:12 dunmatt