Skip to main content

kosher_rust/
lib.rs

1//! Rust port of [KosherJava](https://github.com/KosherJava/zmanim) for Jewish holidays,
2//! halachic times (*zmanim*), and Torah/Talmud learning schedules (e.g. Daf Yomi,
3//! Pirkei Avos). A `no_std` crate (optional `alloc`) for Hebrew calendar extensions,
4//! location-based *zmanim*, and *limudim* calculators.
5//!
6//! # Modules
7//!
8//! | Module | Purpose |
9//! |--------|---------|
10//! | [`calendar`] | Hebrew dates, holidays, *parshiyot*, month constants, and calendar traits |
11//! | [`zmanim`] | Sunrise, candle lighting, *alos*, *tzeis*, and other halachic times |
12//! | [`limudim`] | Daf Yomi, Mishna Yomis, Tehillim, Pirkei Avos, and related daily units |
13//!
14//! Each module has its own [`calendar::prelude`], [`zmanim::prelude`], or
15//! [`limudim::prelude`]. Use [`prelude`] at the crate root when an application
16//! needs more than one area.
17//!
18//!
19//! See each module's documentation for focused examples: [`calendar`] for holidays
20//! and parsha, [`zmanim`] for location-based times, [`limudim`] for learning schedules.
21//!
22//! # Features
23//!
24//! | Feature | Default | Effect |
25//! |---------|---------|--------|
26//! | `alloc` | yes | Zman preset descriptions; without it the crate stays `no_std` and calculation APIs are unchanged |
27//! | `defmt` | no | `defmt::Format` on calculator, config, location, and error types |
28//!
29//! Disable default features in `Cargo.toml` when targeting embedded platforms that
30//! cannot use the allocator:
31//!
32#![cfg_attr(not(test), no_std)]
33
34pub mod calendar;
35pub mod limudim;
36pub mod zmanim;
37
38/// Common imports across [`calendar`], [`zmanim`], and [`limudim`].
39///
40/// Re-exports each submodule's prelude. Prefer a submodule prelude when you only
41/// need one area — for example [`zmanim::prelude`] alone avoids pulling limudim
42/// names into scope.
43///
44/// ```
45/// use kosher_rust::prelude::*;
46/// ```
47pub mod prelude {
48    pub use crate::calendar::prelude::*;
49    pub use crate::limudim::prelude::*;
50    pub use crate::zmanim::prelude::*;
51}