███████╗ █████╗ ██╗ ██╗ █████╗ ████████╗
╚══███╔╝██╔══██╗██║ ██╔╝██╔══██╗╚══██╔══╝
███╔╝ ███████║█████╔╝ ███████║ ██║
███╔╝ ██╔══██║██╔═██╗ ██╔══██║ ██║
███████╗██║ ██║██║ ██╗██║ ██║ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
Zakat
Rust library for Islamic Zakat calculation. Uses rust_decimal for precision.
Features
- Gold, Silver, Business, Agriculture, Livestock, Mining & Rikaz
- Stocks, Mutual Funds, Crypto (as liquid assets)
- Professional Income (Gross/Net)
- Zakat Fitrah
- Configurable Nisab thresholds
- Portfolio aggregation
Install
[]
= "0.1.2"
= "1.39"
= "1.39"
Usage
Business Zakat
use ;
use ;
Portfolio
use ;
use PreciousMetal;
use ;
use ;
use dec;
Custom Nisab
use ZakatConfig;
let config = new
.with_gold_nisab
.with_agriculture_nisab;
Modules
| Module | Nisab |
|---|---|
maal::precious_metals |
85g Gold / 595g Silver |
maal::business |
85g Gold |
maal::income |
85g Gold |
maal::investments |
85g Gold |
maal::agriculture |
653 kg |
maal::livestock |
Count-based |
maal::mining |
Rikaz: None / Mines: 85g Gold |
fitrah |
N/A |
Contributing
- Add tests
- Use
rust_decimal - Run
cargo test
Support
"Those who spend their wealth in the cause of Allah..." — Al-Baqarah 2:262
License
MIT