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.0 covers WeatherService, CurrentWeather, daily/hourly/minute forecasts, weather alerts, availability metadata, WeatherAttribution, SunEvents, MoonEvents, WeatherCondition descriptors, and Pressure helpers.
Quick start
use *;
Highlights
WeatherService::weather,current_weather,daily_forecast,hourly_forecast,minute_forecast,weather_alerts,availability, andattributionDailyForecast/HourlyForecastcontainers with WeatherKit metadata plusDayForecast/HourForecastentriesCurrentWeatherwith 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 availableWeatherAttribution,WeatherSeverity,AvailabilityKind,WeatherCondition,PressureTrend, andMoonPhasedescriptor catalogs- 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.