registrar

Crates.ioregistrar
lib.rsregistrar
version0.9.0
created_at2025-07-29 16:21:46.606002+00
updated_at2025-08-19 21:20:27.919684+00
descriptionA client for domain registrar APIs like Porkbun and Name.com
homepage
repositoryhttps://github.com/excsn/registrar
max_upload_size
id1772512
size164,483
Norm O (normano)

documentation

README

registrar

Crates.io Docs.rs License

A unified, asynchronous, and strongly-typed client for domain registrar APIs. This crate provides a clean and consistent Rust interface for interacting with various registrars, abstracting away the differences in their specific API protocols. It allows developers to manage domains, DNS records, and other registrar services without needing to write clients for each provider.

Key Features

Multi-Provider Support

Interact with multiple domain registrars through a single, consistent library. Each registrar is enabled via a Cargo feature flag, ensuring you only compile the code you need.

  • porkbun: Full support for the Porkbun v3 API.
  • name-com: Full support for the Name.com Core API.

Strongly-Typed & Asynchronous

All API requests and responses are mapped to robust Rust structs, providing compile-time safety and leveraging serde for reliable serialization and deserialization. The entire library is built on async/await, making it non-blocking and suitable for high-performance applications.

Scoped Client Design

The library uses an ergonomic "scoped client" pattern. After instantiating a main provider client (e.g., Porkbun::new(...)), you can create temporary, specialized clients for specific domains (e.g., client.dns("example.com")). This design provides a safe and intuitive way to manage resources.

Installation

Add registrar to your Cargo.toml file. By default, both porkbun and name-com clients are enabled.

[dependencies]
registrar = "0.1.0"

To enable only specific providers and reduce dependencies, disable the default features and specify the ones you need:

[dependencies]
registrar = { version = "0.1.0", default-features = false, features = ["porkbun"] }

Documentation

For a detailed guide on core concepts, configuration, and complete, runnable examples, please see the Usage Guide (README.USAGE.md).

The full, comprehensive API reference is available on docs.rs.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for more details on how to get started, report issues, and submit pull requests.

License

This library is distributed under the terms of the MPL-2.0 License.

Commit count: 3

cargo fmt