OSS TanbouSign in with GitHub

Embed a lightweight TCP/IP stack in devices with constrained memory

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
1,762
Primary language
C
License
Not determined
Repository last updated
Sep 1, 2026
On this page

Overview

lwIP is a C TCP/IP stack for adding network communication to memory-constrained embedded devices. It provides IPv4, IPv6, TCP, UDP, DHCP, DNS, and other protocols, with callback-style raw, sequential, and BSD-like socket APIs for different system architectures. This GitHub repository mirrors the official source developed on Savannah.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Provide core TCP/IP features within a small memory budget

The README targets embedded systems with tens of kilobytes of free RAM and roughly 40 kilobytes of ROM. Its selectable features include IPv4, IPv6, ICMP, TCP, UDP, DHCP, DNS, PPP, and 6LoWPAN, plus applications such as an HTTP server, MQTT client, and SNTP.

Sources: [1]

Choose APIs and OS integration for the runtime

lwIP offers a callback-based raw API for low overhead, sequential APIs for calls from other threads, and a BSD-like socket compatibility API. No-OS mainloop mode and OS mode with a TCPIP thread have different available APIs and call-context rules.

Sources: [2]

Best fit

Fits network ports for RTOS and bare-metal devices

lwIP fits sensors, controllers, and IoT devices that cannot simply use a general-purpose operating system's network stack. It is suitable when a team will implement the network interface, timing, locking, and memory hooks for its hardware and enable only the protocols it needs.

Sources: [1][2]

Before adoption

Design the port and execution contexts for each device

lwIP is not a complete standalone network application. A port needs device drivers, OS abstractions, timers, and an lwipopts.h configuration adapted from the supplied examples. GitHub reports NOASSERTION for SPDX metadata, while the pinned README states that lwIP is available under a BSD license.

Raw APIs execute in the lwIP core context and callbacks must not block. The official documentation identifies calls from interrupt context as a common pitfall and requires OS-mode raw API calls to run in the TCPIP thread or under the correct core lock.

Sources: [1][2]

Official sources

  1. [1]lwIP STABLE-2_2_1_RELEASE README(2026-10-04)
  2. [2]lwIP STABLE-2_2_1_RELEASE API and porting documentation(2026-10-04)
  3. [3]lwIP STABLE-2_2_1_RELEASE CMake configuration(2026-10-04)
Supplemental curator note

Evaluate the API model, operating-system mode, network interface, and memory configuration as one design rather than selecting from the protocol list alone. Establish the interrupt and lwIP-core execution boundaries early.

Try it in 3 steps

  1. 1

    Clone the pinned source

    Enter the lwIP 2.2.1 source reviewed for this guide.

    git clone --branch STABLE-2_2_1_RELEASE --depth 1 https://github.com/lwip-tcpip/lwip.git && cd lwip
  2. 2

    Configure the Unix example

    Copy the Unix example configuration template included in the repository, then configure example_app on Linux, macOS, or FreeBSD. CMake and a C compiler are required. Review lwipcfg.h for the target environment before an embedded port.

    cp contrib/examples/example_app/lwipcfg.h.example contrib/examples/example_app/lwipcfg.h && cmake -S . -B build
  3. 3

    Build the example

    From the same working directory, compile the Unix port example included under contrib. This checks the host build configuration; it does not validate a target-device port or network behavior.

    cmake --build build
Check the official README

Growth

Growth trends · Last 30 days

1,762 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
63

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data
Stars
1,762
Forks
634
Watchers
36
Open issues
0
Contributors
103
Owner type
Organization
Primary language
C
License
Not determined
Repository last updated
Sep 1, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?