Skip to content

dimbleby/rust-c-ares

Repository files navigation

rust-c-ares

A Rust wrapper for the c-ares library, for asynchronous DNS requests.

This repository contains three crates:

  • c-ares-sys is autogenerated unsafe bindings. It is unlikely that you should want to use this directly.
  • c-ares is a safe wrapper around those bindings. If your c-ares is sufficiently recent (1.26+) and built with thread-safety, it should be quite ergonomic to use this crate directly. See the event_thread example. Otherwise you will need to manage your own event loop.
  • c-ares-resolver builds on these crates to offer a friendlier API. It manages an event loop for you, and also provides a variety of resolvers: using callbacks, using futures, or blocking.

Build Status

Features

By default, we will use the c-ares installed on your system, if available.

Force use of the vendored c-ares with the vendored feature.

Deny use of the vendored c-ares by removing the default maybe-vendored feature.

Setting the feature build-cmake will cause the c-ares library to be built using cmake. This is significantly faster than the default autotools build on unix platforms: so if it works for you, you should probably prefer it.

Contributing

Contributions are welcome. Please send pull requests!

About

A Rust wrapper for c-ares

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages