This crate is part of the Rust Zmanim Project.
Zmanim Calculator
A Rust library for calculating halachic zmanim (times), following KosherJava naming and behavior. Supports no_std environments and includes an optional C FFI.
Installation
Or manually add to your Cargo.toml:
[]
= "0.1"
Usage
use ;
use ;
If you omit a timezone, calculations near the anti-meridian (|longitude| > 150) will fail. Kiddush Levana and Molad calculations require a timezone as well.
Feature Flags
std— Enables standard library supportdefmt— Enablesdefmtformatting/logging for embedded targetsc— Enables the C FFI surface and header generation tooling (stdis enabled automatically)
C API
Pre-built libraries and the C header are available on the GitHub Releases page for Linux, macOS, and Windows.
Generate the header:
Build the C-callable library:
The header is written to bindings/c/zmanim_calendar.h.
See example-c-project/ for a complete usage example.
Compatibility
The API aims to follow KosherJava naming and behavior where possible. For background and broader algorithm documentation, see the KosherJava documentation.
License
Licensed under LGPL-2.1. See LICENSE for details.