river-data-core 0.14.0

Client, sync runner, and shared types for the river-data platform
Documentation
[package]
name = "river-data-core"
version = "0.14.0"
edition = "2024"
rust-version = "1.95"
description = "Client, sync runner, and shared types for the river-data platform"
license = "MIT"
repository = "https://github.com/RIVER-EPFL/river-data-core"
keywords = ["sync", "client", "sensors", "environmental", "control-plane"]
categories = ["api-bindings", "science"]
# The portal R sources and their generated fixtures are verification inputs, not crate content.
exclude = ["r_reference/**", "tests/fixtures/**"]

[lints.rust]
unsafe_code = "forbid"

[features]
default = []
client = [
    "dep:reqwest",
    "dep:tokio",
    "dep:async-trait",
    "dep:dotenvy",
    "dep:tracing-subscriber",
    "tokio/rt-multi-thread",
]
# Schema derives on the wire protocol types, for a host application that publishes an OpenAPI spec.
openapi = ["dep:utoipa"]

[dependencies]
# Always
serde = { version = "1.0", features = ["derive"] }
# `float_roundtrip`: without it the JSON parser can land a value one ULP from the literal it read,
# so a source's reported measurement is not the number stored for it.
serde_json = { version = "1.0", features = ["float_roundtrip"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1.11", features = ["v4", "serde"] }
tracing = "0.1"
thiserror = "2.0"

# Client only
tokio = { version = "1.43", features = ["rt", "time", "signal", "sync", "macros"], optional = true }
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false, optional = true }
async-trait = { version = "0.1", optional = true }
dotenvy = { version = "0.15", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }

# Schema derives on the wire protocol types (feature `openapi`)
utoipa = { version = "5.3", features = ["chrono", "uuid"], optional = true }

[dev-dependencies]
http = "1.0"
tokio = { version = "1.43", features = ["macros", "rt-multi-thread"] }
wiremock = "0.6"

[[example]]
name = "minimal_backend"
required-features = ["client"]

[[example]]
name = "csv_folder"
required-features = ["client"]

[[example]]
name = "reconciled_backend"
required-features = ["client"]