95°F Overcast
08/10
code / weathervane

weathervane

Weather, air quality, and alerts from public APIs, as clean Rust types. The engine behind Tempest, pulled into a crate.

Rust v0.10.0 MIT / Apache-2.0 crates.io docs.rs

You call the async functions, you get back clean Rust types. That's it. Weathervane fetches the data, parses the responses, handles unit conversions, and gets out of the way. No UI dependencies. No polling. No timers. No config storage. The frontend owns all of that.

Open-Meteo by default, no key required. Inside Japan it swaps the current temperature for the nearest JMA AMeDAS station, and inside the US it overlays live National Weather Service observations, because the blended model runs a few degrees off ground truth in both. Air quality can use a free aqicn.org token outside Europe; pollutant concentrations always come from Open-Meteo so the µg/m³ contract stays honest. Pollen is Europe-only, six species by way of CAMS.

Alerts come from whichever national service covers the coordinates: NWS in the US, ECCC in Canada, MeteoAlarm across Europe, BOM in Australia. Four providers, normalized into a single Alert type. On Linux it also watches D-Bus and emits an event when connectivity returns or the machine resumes from suspend, degrading quietly everywhere else.

It came out of Tempest in 2.6.0: roughly 1,700 lines moved out of the applet tree so the data layer could stand on its own and be tested without a GUI attached.

cargo add weathervane

links

used by
tempest