# wideholy
[](https://crates.io/crates/wideholy)
[](https://docs.rs/wideholy)
[](https://opensource.org/licenses/MIT)
Async Rust SDK for the [WideHoly](https://wideholy.com) cross-religion scripture hub API. Verse of the day, random verse, cross-religion comparison (Bible vs Quran vs Torah vs Gita vs Sutra), search suggestions, topic-based verse discovery, religious calendar events, and commentary access -- all from a single unified API.
Built on [wideholy.com](https://wideholy.com) -- a multi-religion scripture platform connecting five world religions through shared themes like love, creation, prayer, mercy, and wisdom, enabling interfaith study and comparative theology for scholars and developers.
## Install
```toml
[dependencies]
wideholy = "0.1"
tokio = { version = "1", features = ["full"] }
```
Or via the command line:
```bash
cargo add wideholy tokio --features tokio/full
```
## Quick Start
```rust
use wideholy::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
// Get today's verse of the day from the Bible
let votd = client.verse_of_the_day("bible", None).await?;
println!("{}: {}", votd.reference.unwrap_or_default(), votd.text.unwrap_or_default());
// Get a random verse from any religion
let random = client.random_verse(None).await?;
println!("[{}] {}", random.religion.unwrap_or_default(), random.text.unwrap_or_default());
// Compare Genesis 1:1 with Quran Al-Fatihah 1
let cmp = client.compare("bible:genesis.1.1", "quran:al-fatihah.1").await?;
println!("Comparison: {:?}", cmp.data);
Ok(())
}
```
## What You Can Do
### Verse of the Day
Get a curated daily verse from any of the five supported religions. The verse is deterministic per religion per date, suitable for daily devotional apps or widgets.
```rust
// Bible verse of the day
let votd = client.verse_of_the_day("bible", None).await?;
// Quran verse for a specific date
let votd = client.verse_of_the_day("quran", Some("2026-03-24")).await?;
// Torah, Gita, or Sutra
let votd = client.verse_of_the_day("torah", None).await?;
```
### Cross-Religion Comparison
Compare verses side-by-side across religions. Use the `religion:reference` format to specify verses from different traditions, enabling interfaith dialogue and comparative study.
```rust
// Compare Bible and Quran on creation
let cmp = client.compare("bible:genesis.1.1", "quran:al-fatihah.1").await?;
// Compare Torah and Gita
let cmp = client.compare("torah:genesis.1.1", "gita:2.47").await?;
```
### Topic-Based Discovery
Explore how different religions address universal spiritual themes -- love, creation, prayer, mercy, forgiveness, wisdom, suffering, death, and more. Each topic returns relevant verses from all five religions.
```rust
// Get verses about love across all religions
let love = client.topic_verses("love").await?;
// Cross-religion comparison for creation
let creation = client.cross_religion("creation").await?;
```
### Search and Calendar
Autocomplete suggestions help users discover content across religions. The religious calendar aggregates holidays and observances from all traditions into a unified timeline.
```rust
// Search suggestions
let suggestions = client.search_suggest("mercy", None).await?;
// Religious calendar for March 2026
let events = client.calendar(None, Some(2026), Some(3)).await?;
// Filter by religion
let events = client.calendar(Some("bible"), Some(2026), None).await?;
```
### Commentary
Access scholarly commentary for verses across traditions -- tafsir for Quran, Rashi for Torah, and acharya commentaries for Gita.
| Christianity | Church Fathers, Matthew Henry | 2nd-18th c. | Exegesis, theology |
| Islam | Ibn Kathir, Jalalayn, Tabari | 9th-14th c. | Tafsir (Quranic exegesis) |
| Judaism | Rashi, Ramban, Ibn Ezra | 11th-13th c. | Peshat, derash, remez, sod |
| Hinduism | Shankaracharya, Ramanujacharya | 8th-13th c. | Advaita, Vishishtadvaita, Dvaita |
| Buddhism | Buddhaghosa, Dhammapala | 5th c. | Atthakatha (Pali commentaries) |
```rust
// Get tafsir for a Quran ayah
let comm = client.commentary("quran:al-fatihah.1").await?;
// Get Rashi commentary for a Torah verse
let comm = client.commentary("torah:genesis.1.1").await?;
// Get Shankaracharya's commentary on Gita verse
let comm = client.commentary("gita:2.47").await?;
```
## API Methods
| `verse_of_the_day(religion, date)` | Daily curated verse |
| `random_verse(religion)` | Random verse from any/specific religion |
| `compare(ref_a, ref_b)` | Side-by-side verse comparison |
| `search_suggest(query, religion)` | Autocomplete suggestions |
| `topic_verses(topic)` | Verses for a topic across religions |
| `cross_religion(topic)` | Cross-religion topic comparison |
| `calendar(religion, year, month)` | Religious calendar events |
| `commentary(verse_ref)` | Scholarly commentary for a verse |
All methods are async and return `Result<T, WideHolyError>`.
### Supported Religions
| `bible` | Christianity | [widebible.com](https://widebible.com) |
| `quran` | Islam | [widequran.com](https://widequran.com) |
| `torah` | Judaism | [widetorah.com](https://widetorah.com) |
| `gita` | Hinduism | [widegita.com](https://widegita.com) |
| `sutra` | Buddhism | [widesutra.com](https://widesutra.com) |
## Custom Base URL
```rust
let client = Client::with_base_url("http://localhost:8000/api/v1");
```
## Error Handling
```rust
use wideholy::{Client, WideHolyError};
let client = Client::new();
match client.verse_of_the_day("bible", None).await {
Ok(votd) => println!("{:?}", votd.text),
Err(WideHolyError::Api { status, body }) => {
eprintln!("API error {}: {}", status, body);
}
Err(WideHolyError::Http(e)) => {
eprintln!("Network error: {}", e);
}
}
```
## WideHoly Scripture Platform
| WideBible | [widebible.com](https://widebible.com) | 66 books, 4 translations, cross-references, study tools |
| WideQuran | [widequran.com](https://widequran.com) | 114 surahs, hadith, tafsir, Quranic people |
| WideTorah | [widetorah.com](https://widetorah.com) | Tanakh, Talmud, Mishnah, Rashi, parashot |
| WideGita | [widegita.com](https://widegita.com) | Bhagavad Gita, Upanishads, Yoga Sutras, deities |
| WideSutra | [widesutra.com](https://widesutra.com) | Tipitaka, Pali Canon, Buddhist concepts |
| **WideHoly** | [wideholy.com](https://wideholy.com) | **Cross-religion hub, comparison, calendar** |
## Also Available
| **Rust** | [wideholy](https://crates.io/crates/wideholy) | `cargo add wideholy` |
| Python | [wideholy](https://pypi.org/project/wideholy/) | `pip install wideholy` |
| TypeScript | [wideholy](https://www.npmjs.com/package/wideholy) | `npm install wideholy` |
## Learn More About World Scriptures
- **Scripture**: [WideBible](https://widebible.com/) · [WideQuran](https://widequran.com/) · [WideTorah](https://widetorah.com/) · [WideGita](https://widegita.com/) · [WideSutra](https://widesutra.com/)
- **Reference**: [Cross-Religion Topics](https://wideholy.com/topics/) · [Religious Calendar](https://wideholy.com/developers/)
- **Study**: [Verse Comparison](https://wideholy.com/developers/) · [Commentary](https://wideholy.com/developers/)
- **Tools**: [Search](https://wideholy.com/) · [Developer Docs](https://wideholy.com/developers/)
- **API**: [Developer Docs](https://wideholy.com/developers/) · [OpenAPI Spec](https://wideholy.com/api/schema/)
## License
MIT