| Crates.io | zone-edit |
| lib.rs | zone-edit |
| version | 0.2.3 |
| created_at | 2025-09-24 01:31:26.41163+00 |
| updated_at | 2025-09-24 01:47:27.398203+00 |
| description | A minimal library of DNS provider utilities |
| homepage | |
| repository | https://github.com/tarka/zone-edit |
| max_upload_size | |
| id | 1852320 |
| size | 93,525 |
A minimal Rust library for updating DNS records with various DNS providers.
Zone Edit is a lightweight library that provides a simple interface for programmatically managing DNS records through provider APIs. Currently, it supports the following DNS providers:
The library is async and supports both smol and tokio.
Add this to your Cargo.toml:
[dependencies]
zone-edit = "0.1.0"
use zone_edit::{gandi, errors::Result};
use std::net::Ipv4Addr;
async fn update_gandi_record() -> Result<()> {
let config = zone_edit::Config {
domain: "example.com".to_string(),
dry_run: false,
};
let auth = gandi::Auth::ApiKey("your-api-key".to_string());
let client = gandi::Gandi::new(config, auth);
let host = "www";
let new_ip = Ipv4Addr::new(192, 0, 2, 1);
// Update the A record for www.example.com
client.update_v4_record(host, &new_ip).await?;
Ok(())
}
This project is licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.