#zone #dns #abstract #api-bindings

libdns

Abstracting and implementing DNS zone management for different providers

2 releases

0.1.1 Apr 6, 2024
0.1.0 Apr 4, 2024

#17 in #zone

Download history 176/week @ 2024-03-31 50/week @ 2024-04-07 1/week @ 2024-04-14

158 downloads per month

0BSD license

37KB
723 lines

libdns-rs

crates.io Docs Build and check

This project is a rip-off of libdns written in Rust. It defines an abstract API for managing DNS zones and implements it for several widely-used providers.

[!NOTE] This project is my very first (serious) attempt at learning Rust. I am more than thankful for any suggestions and tips on this matter, so please feel welcomed to bring them up in an issue :)

Using

To add libdns to your project, an entry like the following would be enough to include only the abstract DNS zone management traits:

[dependencies]
libdns = { version = "0" }

Including provider implementations

If you need one or more concrete provider implementations as well, you can simply add their corresponding feature flags to the dependency's features field:

Provider Feature Flag
Hetzner hetzner

Choosing TLS backend

The provider implementations use reqwest for communicating with their APIs whenever possible. By default, the default-tls feature is enabled for reqwest. These features can be given instead for choosing a different TLS backend (remember to disable the default features):

  • default-tls (default)
  • rustls-tls
  • native-tls
  • native-tls-vendor

Please refer to reqwests docs for an overview on what TLS backend does what.

Contributing

I am grateful for any contribution to this project, so feel free to request, add or fix provider implementations when neccessary.

Dependencies

~0.3–17MB
~196K SLoC