weatherkit-rs
Safe Rust bindings for Apple's WeatherKit framework on macOS 13+.
The published package is weatherkit-doomfish; the Rust library crate is imported as weatherkit.
Status: v0.2.1 covers the full non-exempt macOS WeatherKit surface, including WeatherService multi-query helpers, statistics/summaries, weather changes, historical comparisons, and enum descriptor catalogs.
Quick start
use *;
Highlights
WeatherService::weather,current_weather,daily_forecast,hourly_forecast,minute_forecast,weather_alerts,availability,attribution, and multi-queryweather_including{2..6}/weather_including_manyDailyForecast/HourlyForecastcontainers with WeatherKit metadata plusDayForecast/HourForecastentries- macOS 15+ statistics and summary wrappers (
DailyWeatherStatistics,DailyWeatherSummary,HourlyWeatherStatistics,MonthlyWeatherStatistics) with query enums and service helpers WeatherChanges,HistoricalComparisons,Trend,TrendBaseline, andPercentilesfor the new WeatherKit comparison/change-tracking APIsCurrentWeatherwith precipitation intensity, metadata, and cloud-cover-by-altitude when available on macOS 15+DayForecastwithSunEvents,MoonEvents,UVIndex, wind, day-part forecasts, and precipitation-by-type details when available- Descriptor catalogs for
WeatherAttribution,WeatherSeverity,AvailabilityKind,WeatherCondition,Precipitation,PressureTrend,MoonPhase,WindCompassDirection,UVExposureCategory, andWeatherError - Async Swift APIs bridged to synchronous Rust via
DispatchSemaphore + Task, with opaque handle ownership released on the Rust side
Entitlements / caveats
WeatherKit usually requires an entitled bundle ID backed by a paid Apple Developer membership. Unsigned CLI binaries often fail with permission or bundle-configuration errors; every example in examples/ treats that as a caveat instead of a hard failure.
Examples
Each logical area has a dedicated example:
License
Licensed under either Apache-2.0 or MIT at your option.