sntp/lib.rs
1/*! A Simple Network Time Protocol (SNTP) client implementation using [`smoltcp`].
2
3This crate has been developed with `#![no_std]` use in mind: it doesn't perform
4heap allocations, and does not rely on the `alloc` feature of `smoltcp`.
5
6For convenience, this crate re-exports `smoltcp` under the `net` name.
7
8# Examples
9
10An example on how to use this crate can be found in the source repository.
11
12# Features
13
14The following features can be enabled at the crate level:
15
16## `log`
17
18Enable logging for network activity. Useful to debug the client operation.
19
20Disabled by default
21
22[`smoltcp`]: https://github.com/smoltcp-rs/smoltcp
23*/
24
25#![deny(warnings)]
26#![deny(missing_docs)]
27#![deny(unsafe_code)]
28#![no_std]
29
30#[cfg(any(test, feature = "std"))]
31#[macro_use]
32extern crate std;
33
34#[cfg(feature = "log")]
35#[macro_use(trace, debug)]
36extern crate log;
37
38// Re-export smoltcp
39pub use smoltcp as net;
40
41#[macro_use]
42mod macros;
43mod client;
44mod wire;
45
46// Export public types
47pub use client::Client;