-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network abstractions crate #348
Comments
hey interesting idea! seems possible, though i suspect we'd need some more examples to extract the commonality and create something generally useful. my suggestion would be that it might be worth developing the networking bits outside the wg with the goal of adoption once it's demonstrated / useful? also i think an ethernet peripheral trait (if it can be generalised) is definitely in scope for embedded-hal ^_^ |
Don't forget you need Ethernet at two levels of abstraction, original IEEE 802.3 which can be directly under IP protocol and works today on copper or fibre cable and higher one for everything that mimics Ethernet frames on top of medium like IEEE 802.11 or FrameRelay. The former fits into |
See also rust-embedded/embedded-hal#146 |
You can look also here: |
Would there be interest in just embedded networking types to start with? It would not solve the problem; but it would improve portability across existing embedded networking libraries. Specifically I am thinking there should be types for ipv4/ipv6 addresses and EUI-48/EUI-64 hardware addresses. These have very well defined standards, and in the case of IP address there is a lot to leverage from ip.rs in std::net. |
Related: rust-lang/rfcs#2832 |
ahh glad to see some progress on the move of types to core! supporting both |
This is another crate that I've seen used in a few embedded crates: https://github.com/thejpster/embedded-nal Edit: Just now noticing the original author is in this thread 😄 |
We agreed in today's WG meeting that |
Would there be some value in a crate for network layer abstractions (e.g. Ethernet, IP, TCP, etc.) in the same vein as
embedded-hal
?This may a naive view, but it seems to me that it would be very useful for building up an embedded networking stack. For example:
A common
Ethernet
trait implemented by board support and driver crates would allow TCP crates (such assmoltcp
) to run on arbitrary hardware.A common
TcpSocket
trait implemented by TCP crates (and maybe even std?) would allow higher level abstractions (such as TLS or HTTP) to be built more easily.The text was updated successfully, but these errors were encountered: