RustUse is “Composable sets of primitive Rust utility crates for fellow crustaceans.”
use-meteorology is a primitive meteorology vocabulary set. It provides small, composable Rust primitives for describing weather observations, atmospheric conditions, air temperature, atmospheric pressure, humidity, wind, clouds, precipitation, weather fronts, pressure systems, and forecast vocabulary.
use-meteorology is not a weather API client, forecasting engine, climate model, atmospheric simulation system, storm prediction system, radar processor, weather station runtime, GIS system, meteorology framework, or alerting system. It does not fetch weather data, predict weather, simulate the atmosphere, process radar or satellite feeds, manage station runtimes, or issue alerts.
use-geographyowns location, place, region, and spatial-reference primitives.use-physicsowns broader pressure, fluids, waves, radiation, and thermodynamic concepts.use-unitsanduse-measureown general unit and measurement primitives.use-timeowns timestamps, durations, intervals, and calendars.use-dataanduse-validatecomplement this set for storage-agnostic data containers and validation helpers.
use-meteorology stays focused on descriptive meteorology vocabulary. It should describe weather concepts, not fetch, predict, simulate, alert, or analyze them.
use-meteorology: facade crate for the full primitive vocabulary setuse-weather-observation: primitive weather observation vocabularyuse-atmosphere: primitive atmosphere vocabularyuse-air-temperature: primitive meteorological air temperature vocabularyuse-atmospheric-pressure: primitive atmospheric pressure vocabularyuse-humidity: primitive humidity vocabularyuse-wind: primitive wind vocabularyuse-cloud: primitive cloud vocabularyuse-precipitation: primitive precipitation vocabularyuse-weather-front: primitive weather front vocabularyuse-pressure-system: primitive pressure system vocabularyuse-weather-forecast: primitive forecast vocabulary
- small focused crates
- primitives over frameworks
- few or no dependencies
- stable APIs
- Rust 2024 edition
- strong documentation
- meaningful tests
- composable exports
- dual MIT OR Apache-2.0 license
- no unnecessary macros
- no async
- no global runtime assumptions
- no unsafe code
- no network calls
- no simulation
- no prediction engine
- no GIS behavior
use use_meteorology::prelude::{
AirTemperature, AtmosphericPressure, CloudKind, ForecastKind, ObservationKind,
PrecipitationKind, PressureSystemKind, RelativeHumidity, WeatherFrontKind, WindDirection,
WindSpeed,
};
let observation_kind = ObservationKind::Surface;
let air_temperature = AirTemperature::new(21.5).unwrap();
let pressure = AtmosphericPressure::new(1012.4).unwrap();
let humidity = RelativeHumidity::new(68.0).unwrap();
let wind_speed = WindSpeed::new(7.2).unwrap();
let wind_direction = WindDirection::new(225.0).unwrap();
let cloud_kind = CloudKind::Cumulus;
let precipitation_kind = PrecipitationKind::Rain;
let front_kind = WeatherFrontKind::Cold;
let pressure_system_kind = PressureSystemKind::Low;
let forecast_kind = ForecastKind::ShortRange;
assert_eq!(observation_kind.to_string(), "surface");
assert_eq!(air_temperature.celsius(), 21.5);
assert_eq!(pressure.hectopascals(), 1012.4);
assert_eq!(humidity.percent(), 68.0);
assert_eq!(wind_speed.meters_per_second(), 7.2);
assert_eq!(wind_direction.degrees_from_north(), 225.0);
assert_eq!(cloud_kind.to_string(), "cumulus");
assert_eq!(precipitation_kind.to_string(), "rain");
assert_eq!(front_kind.to_string(), "cold");
assert_eq!(pressure_system_kind.to_string(), "low");
assert_eq!(forecast_kind.to_string(), "short-range");This example describes meteorological concepts. It does not fetch weather data, predict weather, simulate atmosphere, process radar, or issue alerts.
use-geographyuse-physicsuse-unitsuse-measureuse-timeuse-datause-validate
Licensed under either of the following, at your option:
- MIT License
- Apache License, Version 2.0