Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. c-ares

c-ares

MITCv1.34.6

A C library for asynchronous DNS resolution, designed for non-blocking and parallel queries.

Visit WebsiteGitHubGitHub
2.1k stars658 forks0 contributors

What is c-ares?

c-ares is a C library for asynchronous DNS resolution, designed to perform non-blocking and parallel DNS queries. It abstracts the intricacies of the DNS protocol, providing a modern, secure alternative to system resolvers. The library focuses on cross-platform compatibility and adherence to the latest DNS RFCs.

Target Audience

Developers building network applications in C or other languages that require efficient, non-blocking DNS resolution, such as embedded systems, servers, and high-performance clients.

Value Proposition

c-ares offers a more secure and reliable DNS resolver than many system-provided alternatives, with a strong emphasis on asynchronous operations, extensive RFC support, and rigorous security practices through continuous fuzzing and testing.

Overview

A C library for asynchronous DNS requests

Use Cases

Best For

  • Implementing non-blocking DNS lookups in network servers
  • Building cross-platform applications requiring consistent DNS resolution
  • Enhancing security in DNS parsing and query handling
  • Developing embedded systems with limited threading capabilities
  • Performing parallel DNS queries for high-performance clients
  • Replacing system DNS resolvers with a more robust library

Not Ideal For

  • Projects requiring only simple, synchronous DNS lookups without async benefits
  • Applications that need to implement a full DNS server with authoritative or recursive capabilities
  • Developers working in high-level languages like Python or JavaScript where built-in async DNS APIs are sufficient
  • Ultra-constrained embedded systems where a minimal, non-library resolver is preferred due to memory limits

Pros & Cons

Pros

Asynchronous Query Handling

Enables non-blocking and parallel DNS queries, preventing application stalls, as emphasized in the README for applications needing multiple queries without blocking.

Cross-Platform Portability

Runs on Linux, FreeBSD, macOS, Windows, Android, iOS, and more, ensuring consistent DNS resolution across diverse operating systems.

Security-Focused Design

Implements safe parsers and data builders, validated through extensive automated testing and constant fuzzing via OSS Fuzz, reducing common C library vulnerabilities.

Modern Standards Compliance

Supports key DNS RFCs including EDNS0, IPv6 (AAAA), SRV, DANE, SVCB/HTTPS, and DNS Cookies, keeping up with the latest protocol features.

System-Agnostic Resolver

Aims to be a better DNS resolver than system-provided ones, as stated in the README, offering improved reliability and performance regardless of platform.

Cons

C Language Barrier

Requires C knowledge or language bindings for integration, which can be a hurdle for projects in non-C languages, adding complexity to setup.

Limited to Stub Resolution

Only functions as a DNS stub resolver, lacking features for full DNS server operations like authoritative serving or caching recursion, as admitted in its design.

No Built-in DoH Support

While it supports modern RFCs, DNS over HTTPS (DoH) is not mentioned in the features, limiting use in privacy-focused applications without additional implementation.

Integration Overhead

Adding a C library to projects, especially in non-C environments, involves build system adjustments and potential binding issues, increasing initial setup effort.

Frequently Asked Questions

Quick Stats

Stars2,127
Forks658
Contributors0
Open Issues38
Last commit12 days ago
CreatedSince 2010

Tags

#c-library#library#embedded#async#dns#network-programming#asynchronous-io#c#security#protocol-implementation#system-libraries#cross-platform#resolver

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
MongooseMongoose

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

Stars12,716
Forks2,903
Last commit2 days 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