acl is a free, open source databases project written in C and released under LGPL-2.1. It has 3,105 GitHub stars, 951 forks and 40 open issues, and was last pushed 4 days ago. On this registry it ranks #181 of 203 tracked projects in Databases, with 5 head-to-head comparisons available.

What is acl?

Acl (Advanced C/C++ Library, "Advanced Cross-Platform C/C++ Network Communication Library and Server Framework") is a cross-platform C network communication library and server framework, with coroutine, HTTP/HTTPS/WebSocket, MQTT, SMTP, Redis, Memcached and MySQL/PostgreSQL/SQLite support, built for developers writing network servers and clients on Linux, Windows, Solaris, FreeBSD, macOS, Android, iOS and HarmonyOS.

What it is

Acl is written in C and licensed under LGPL-2.1. Its README organises the project around six core modules: basic network communication, coroutine, HTTP, Redis client, MQTT and the server framework. Beyond those, it ships a MIME module, a codec module, a database module, a connection pool manager, additional client libraries and a DNS module. The registry topics confirm the scope: coroutine, fiber, network, http, http-client, http-server, https, websocket, redis, redis-client, memcached-clients, mqtt-client, mqtt-protocol and smtp. The project homepage is https://acl-dev.cn.

The concrete problem it addresses is fragmentation in C/C++ service development, where a single backend usually ends up pulling in one library per protocol, one per codec and one per database driver. Acl bundles built-in implementations of HTTP, SMTP, ICMP, MQTT, Redis, Memcached, Beanstalk and Handler Socket, complete codec libraries for XML, JSON, MIME, BASE64, UUCODE, QPCODE, RFC2047 and RFC1035, and a unified abstract interface for MySQL, PostgreSQL and SQLite so the same database code targets all three. A connection pool manager and a stream processing module that reads line by line with \r\n and \n compatibility, supports custom string delimiters, formatted writes similar to fprintf, batch writes similar to writev and file positioning similar to fseek, ftell and ftruncate cover the plumbing beneath those protocols. The README states that applications built with Acl run on various devices and serve hundreds of millions of users.

Key capabilities

  • Six core modules named in the README: basic network communication, coroutine, HTTP, Redis client, MQTT and server framework.
  • HTTP server and HTTP client with HTTPS and WebSocket support, with coroutine HTTP server and coroutine TCP server recipes in the Quick Start section.
  • Built-in protocol clients for Redis, Memcached, Beanstalk, Handler Socket, MQTT, SMTP and ICMP.
  • Unified abstract database interface for MySQL, PostgreSQL and SQLite, plus a connection pool manager.
  • Codec libraries covering XML, JSON, MIME, BASE64, UUCODE, QPCODE, RFC2047 and RFC1035.
  • Stream processing module: line reads compatible with \r\n and \n, custom delimiters, reads of specified length, formatted write similar to fprintf, batch write similar to writev, positioning similar to fseek and ftell.
  • DNS module and further client libraries sitting outside the six core modules.

Who uses it and how

  • Teams shipping servers across Linux, Windows, Solaris, FreeBSD, macOS, Android, iOS and HarmonyOS, all listed as supported platforms.
  • Database-backed services, where the abstract interface and connection pool let one codebase serve MySQL, PostgreSQL and SQLite backends.
  • Projects following the README Quick Start recipes: first Acl example, simple TCP server, simple TCP client, coroutine TCP server, HTTP client, coroutine HTTP server and Redis client example.
  • Real-world products listed in the README include webcool. Repository signals: 3105 stars, 951 forks, 40 open issues, last push 2026-09-14.

Getting started

Build Acl from source, following the README's "Compiling Acl on Different Platforms" section and its separate notes on Windows compilation. Then work through section 4, Quick Start, which walks from the first Acl example to a coroutine HTTP server and a Redis client, with sample code in section 5.1, more simple examples in 5.2 and further material at https://acl-dev.cn.

How it compares

The facts provide no list of paid products that Acl replaces, and the README names no comparable library. Acl therefore stands alone in this registry entry: no other listed project matches it as a combined C network library, coroutine runtime, protocol client set and database abstraction in one LGPL-2.1 package.

When to use it — and when not to

A self-hoster must compile per target platform and work through the platform-specific notes, with Windows compilation called out separately, and must accept the obligations of LGPL-2.1 when distributing linked applications. The provided facts document no package-manager entry, container image or hosted install path, so adoption means carrying a C toolchain and source builds rather than adding a dependency in one line. It is a poor fit for teams that want a managed runtime, an out-of-the-box container deployment, or documentation only in one language, since the README ships in English with README_CN.md alongside it.

project readme (upstream, from github) — read inline

中文

Acl -- Advanced Cross-Platform C/C++ Network Communication Library and Server Framework

0. About Acl Project

Acl (Advanced C/C++ Library) is a powerful cross-platform network communication library and server programming framework that supports Linux, Windows, Solaris, FreeBSD, macOS, Android, iOS, and HarmonyOS. Numerous applications developed with Acl run on various devices, providing stable and reliable services to hundreds of millions of users.

The Acl project includes a rich set of functional modules: network communication, server framework, application protocols, various codecs, and more. It has built-in implementations of common network protocols such as HTTP/SMTP/ICMP/MQTT/Redis/Memcached/Beanstalk/Handler Socket, as well as complete codec libraries including XML/JSON/MIME/BASE64/UUCODE/QPCODE/RFC2047/RFC1035, etc. Additionally, Acl provides a unified abstract interface for mainstream databases (MySQL, PostgreSQL, SQLite), enabling developers to write database applications more easily, quickly, and securely.

Software Architecture

Overall Architecture



1. Six Core Modules

As a fully-featured C/C++ foundation library, Acl provides rich and practical functionality for application development. The six core modules include: Network Communication, Coroutine, HTTP, Redis Client, MQTT, and Server Framework.

1.1. Basic Network Module

Stream Processing Module
This module is the cornerstone of Acl's network communication, providing a unified streaming communication interface that supports both network streams and file streams. Main features include:

  • Read data line by line, automatically compatible with \r\n on Windows and \n on UNIX
  • Read data line by line with automatic removal of trailing newline characters (\n or \r\n)
  • Read data with custom string delimiters
  • Read data of specified length
  • Try to read a line or specified length of data
  • Detect network IO status
  • Write a line of data
  • Formatted data writing (similar to fprintf)
  • File stream positioning operations (similar to fseek)
  • Batch write data (similar to UNIX writev)
  • Truncate files (similar to ftruncate)
  • Get file size and current file stream pointer position (similar to ftell)
  • Get local and remote addresses of network streams

Network Operation Module
This module provides complete network operation functionality, including:

  • Network server listening (supports TCP/UDP/UNIX domain sockets)
  • Network client connection (supports TCP/UNIX domain sockets)
  • DNS domain name query and result caching (supports both system API calls and direct DNS protocol)
  • Socket operations and local network interface information retrieval

Non-blocking Network Stream
Comprehensive support for non-blocking network operations, including non-blocking connections, reads (line reads, specified length reads), writes (line writes, specified length writes, batch writes), etc.

Common Network Application Protocol Library
Built-in implementations of common network application protocols such as HTTP, SMTP, ICMP, etc. The HTTP and ICMP modules support both blocking and non-blocking communication modes. The HTTP protocol in the C++ version of lib_acl_cpp provides both server and client modes:

  • Server Mode: Provides a Java HttpServlet-like interface, supports Cookie, Session, HTTP MIME file upload, etc.
  • Client Mode: Supports connection pool and cluster management, chunked transfer, automatic character set conversion, automatic decompression, resume download, and other rich features

Common Network Communication Library
Provides client communication libraries for Memcached, Beanstalk, Handler Socket, etc., all supporting connection pool mode.

1.2. Coroutine

Acl's coroutine module is a mature and stable cross-platform coroutine library that has been widely used and validated in many important projects.

Platform Support

  • Supports mainstream operating systems including Linux, macOS, Windows, iOS, and Android
  • Supports multiple CPU architectures including x86, ARM, etc.
  • Supports multiple event engines including select/poll/epoll/kqueue/iocp/win32 GUI messages

Core Features

  • Complete DNS Protocol Implementation: DNS protocol is natively implemented in coroutines, DNS API can be used directly in coroutines
  • System API Hook: Automatically hooks system IO APIs on Unix and Windows platforms to enable coroutine support
    • Read APIs: read/readv/recv/recvfrom/recvmsg
    • Write APIs: write/writev/send/sendto/sendmsg/sendfile64
    • Socket APIs: socket/listen/accept/connect/setsockopt
    • Event APIs: select/poll/epoll_create/epoll_ctl/epoll_wait
    • DNS APIs: gethostbyname/gethostbyname_r/getaddrinfo/freeaddrinfo
  • Shared Stack Mode: Supports shared stack mode to significantly reduce memory usage

Synchronization Primitives

  • Coroutine Mutex and Semaphore: For synchronization between coroutines
  • Coroutine Event: Supports synchronous communication between coroutines and threads

For more details, see Using Acl Coroutine Library

1.3. HTTP Module

Complete implementation of HTTP/1.1 protocol, supporting both client and server application development.

Main Features

  • Java HttpServlet-like Interface (server side): Provides familiar programming interface, reducing learning curve
  • Connection Pool Mode (client side): Efficiently manages connection resources, improves performance
  • Chunked Transfer: Supports streaming data transfer
  • Compression: Built-in Gzip compression/decompression support
  • SSL/TLS Encryption: Supports secure encrypted transmission
  • Resume Download: Supports resume download for large files
  • Cookie Management: Complete cookie setting and retrieval functionality
  • Session Management (server side): Built-in session management mechanism
  • WebSocket Support: Supports WebSocket protocol
  • HTTP MIME Format: Supports MIME multipart data format
  • Sync/Async Mode: Flexible choice of communication modes

1.4. Redis Client

Acl's Redis client module is powerful, high-performance, and easy to use, making it an ideal choice for production environments.

Features

  • Rich Command Support: Supports Redis data types and commands including Bitmap/String/Hash/List/Set/Sorted Set/PubSub/HyperLogLog/Geo/Script/Stream/Server/Cluster
  • STL-style Interface: Provides STL-like C++ interface for each Redis command, conforming to C++ programming conventions
  • Smart Cluster Management: Client automatically caches and adapts to changes in Redis cluster hash slots without manual intervention
  • Multiple Communication Modes: Supports standalone, cluster, and pipeline modes with unified interface
  • Connection Pool Support: Built-in connection pool supporting standalone and cluster

readme truncated — read the full docs on github

Frequently asked questions

Is acl free to use?

acl is open source under the LGPL-2.1 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does acl do?

C/C++ server and network library, including coroutine,redis client,http/https/websocket,mqtt, mysql/postgresql/sqlite client with C/C++ for Linux, Android, iOS,

What is acl written in?

acl is primarily written in C. Its source is publicly available at https://github.com/acl-dev/acl, and it has 3,105 GitHub stars.