Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. Mongoose

Mongoose

NOASSERTIONC7.21

A cross-platform embedded networking library for C/C++ with built-in TCP/IP stack, HTTP, WebSocket, and MQTT support.

Visit WebsiteGitHubGitHub
12.7k stars2.9k forks0 contributors

What is Mongoose?

Mongoose is an embedded networking library for C/C++ that provides event-driven, non-blocking APIs for TCP, UDP, HTTP, WebSocket, MQTT, and other protocols. It solves the problem of connecting devices to the internet by offering a lightweight, portable solution that works across a wide range of hardware, from microcontrollers to servers. The library includes its own TCP/IP stack for bare-metal systems and supports external stacks like lwIP, making it versatile for embedded and IoT applications.

Target Audience

Embedded software engineers and firmware developers working on IoT devices, industrial automation, consumer electronics, or any C/C++ project requiring network connectivity on resource-constrained hardware.

Value Proposition

Developers choose Mongoose for its exceptional portability, minimal footprint, and comprehensive protocol support, which simplifies embedded network programming. Its built-in TCP/IP stack reduces dependencies, while proven reliability in production environments (including space missions) and strong security practices make it a trusted choice for commercial products.

Overview

Embedded web server, with TCP/IP network stack, MQTT and Websocket

Use Cases

Best For

  • Adding web server capabilities to microcontrollers (e.g., STM32, ESP32) for device dashboards
  • Implementing MQTT clients or brokers in embedded systems for IoT telemetry
  • Creating WebSocket servers for real-time communication on embedded devices
  • Building RESTful APIs on bare-metal or RTOS-based systems
  • Developing cross-platform network applications that run on both embedded hardware and desktop OS
  • Enabling over-the-air (OTA) firmware updates for connected devices

Not Ideal For

  • Projects developed in high-level languages like Python or JavaScript where frameworks offer more integrated tooling
  • Applications requiring extensive GUI development or desktop app frameworks beyond networking functionality
  • Teams seeking out-of-the-box cloud services with managed authentication and database integration
  • Systems with strict real-time deterministic requirements where specialized RTOS networking stacks are preferred

Pros & Cons

Pros

Exceptional Cross-Platform Portability

Works on Linux, Windows, MacOS, Android, and embedded chips like STM32 and ESP32 with a single codebase, enabling unified network code across diverse hardware.

Comprehensive Built-In Protocols

Supports TCP, UDP, HTTP, WebSocket, MQTT, and SNTP out of the box, reducing dependency on additional libraries for common IoT and embedded use cases.

Minimal Resource Footprint

Requires only two source files (mongoose.c and .h) and offers a tiny static and runtime footprint, making it ideal for memory-constrained embedded devices.

Integrated TCP/IP Stack

Includes a lightweight built-in stack for bare-metal or RTOS systems, eliminating external dependencies like lwIP and simplifying deployment on supported MCUs.

Proven Production Reliability

Used since 2004 in commercial products and even on the International Space Station, with strong security practices and continuous fuzzing integration.

Cons

Dual Licensing Complexity

Uses GPLv2 or commercial licensing, which can be restrictive for proprietary projects without a paid license, adding overhead for some teams.

Limited Language Support

Exclusively for C and C++ projects, not suitable for developers using other programming languages like Rust or Go for embedded systems.

Driver and Platform Constraints

The built-in TCP/IP stack supports specific hardware drivers (e.g., STM32, NXP), so unsupported platforms require external stacks, adding integration complexity.

Embedded-Focused Scope

Lacks higher-level abstractions common in desktop/server libraries, such as built-in authentication or database connectors, requiring manual implementation.

Frequently Asked Questions

Quick Stats

Stars12,716
Forks2,903
Contributors0
Open Issues4
Last commit2 days ago
CreatedSince 2012

Tags

#c-library#websocket-server#iot#http-server#webserver#web-server#tcp#bare-metal#mqtt#http#embedded#iot-framework#mqtt-client#websocket#tcp-ip-stack#cross-platform#udp

Built With

C
C++

Links & Resources

Website

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

uWebSocketsuWebSockets

Simple, secure & standards compliant web server for the most demanding of applications

Stars18,806
Forks1,850
Last commit2 days ago
KCPKCP

:zap: KCP - A Fast and Reliable ARQ Protocol

Stars16,690
Forks2,596
Last commit1 year ago
Cpp-HttpLibCpp-HttpLib

A C++ header-only HTTP/HTTPS server and client library

Stars16,394
Forks2,666
Last commit4 days ago
RedpandaRedpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!

Stars11,997
Forks732
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub