`embedded-nal`
FreeAn Embedded Network Abstraction Layer - [](https://crates.io/crates/embedded-nal)
About `embedded-nal`
embedded-nal is an open-source Rust crate that defines a simple set of traits for an Embedded Network Abstraction Layer (NAL). These traits can be implemented by almost any TCP/IP stack, including on-chip stacks like smoltcp or off-chip stacks via AT modems. The project follows a structured process for proposing new traits: research/discussion, implementation/demonstration, and finally a pull request. It is dual-licensed under Apache 2.0 and MIT, and guarantees compilation on stable Rust 1.77.0 and up. The repository also hosts an asynchronous variant, embedded-nal-async, in a sub-crate within the same workspace.
Key Features
Pros & Cons
- Provides portability across different TCP/IP stacks with a common trait interface
- Well-defined and community-reviewed process for adding new traits
- Supports both synchronous and asynchronous networking via embedded-nal-async
- Dual license allows flexible use in open-source and proprietary projects
- Open-source with active community involvement (rust-embedded-community)
- Low-level abstraction; users need familiarity with embedded networking concepts
- Documentation limited to the README and API reference
- Trait design is evolving; stability not guaranteed for all traits