[package]
name = "sntpc"
version = "0.3.8"
description = "Library for making SNTP requests"
homepage = "https://github.com/vpetrigo/sntpc"
repository = "https://github.com/vpetrigo/sntpc"
documentation = "https://docs.rs/sntpc"
readme = "README.md"
categories = ["date-and-time", "no-std", "embedded", "asynchronous"]
keywords = ["sntp", "ntp", "sntp-client", "ntp-client"]
license = "BSD-3-Clause"
authors = ["Vladimir Petrigo <vladimir.petrigo@gmail.com>"]
edition = "2018"
autoexamples = false

exclude = [
    ".github/*",
    "CONTRIBUTING.md",
    ".*",
]

[features]
default = ["std"]
std = []
utils = ["std", "chrono/clock"]
async = []
async_tokio = ["std", "async", "tokio", "async-trait"]

[dependencies]
log = { version = "~0.4", optional = true }
chrono = { version = "~0.4", default-features = false, optional = true }
# requred till this https://github.com/rust-lang/rfcs/pull/2832 is not addressed
no-std-net = "~0.6"

async-trait = { version = "0.1", optional = true }
tokio = { version = "1", features = ["full"], optional = true }

[dev-dependencies]
simple_logger = { version = "~1.13" }
smoltcp = { version = "~0.9", default-features = false, features = ["phy-tuntap_interface", "socket-udp", "proto-ipv4"] }
clap = { version = "2.33", default-features = false }

[badges]
maintenance = { status = "actively-developed" }

[[example]]
name = "simple_request"
required-features = ["std"]

[[example]]
name = "timesync"
required-features = ["utils"]

[[example]]
name = "smoltcp_request"
required-features = ["std"]

[[example]]
name = "tokio"
required-features = ["async_tokio"]
