|
25 | 25 | <a href="https://www.rust-lang.org/en-US/">
|
26 | 26 | <img src="https://img.shields.io/badge/Made%20with-Rust-orange.svg" alt='Build with Rust' />
|
27 | 27 | </a>
|
28 |
| - <a href="https://blog.rust-lang.org/2020/03/12/Rust-1.45.html"> |
29 |
| - <img src="https://img.shields.io/badge/rustc-1.45+-yellow.svg" alt='Minimum Rust Version' /> |
| 28 | + <a href="https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html"> |
| 29 | + <img src="https://img.shields.io/badge/rustc-1.46+-yellow.svg" alt='Minimum Rust Version' /> |
30 | 30 | </a>
|
31 | 31 | </p>
|
32 | 32 |
|
@@ -62,8 +62,8 @@ use influxdb::{Client, Query, Timestamp};
|
62 | 62 | use influxdb::InfluxDbWriteable;
|
63 | 63 | use chrono::{DateTime, Utc};
|
64 | 64 |
|
65 |
| -#[async_std::main] |
66 |
| -// or #[tokio::main] if you prefer |
| 65 | +#[tokio::main] |
| 66 | +// or #[async_std::main] if you prefer |
67 | 67 | async fn main() {
|
68 | 68 | // Connect to db `test` on `http://localhost:8086`
|
69 | 69 | let client = Client::new("http://localhost:8086", "test");
|
@@ -101,11 +101,21 @@ in the repository.
|
101 | 101 |
|
102 | 102 | ## Choice of HTTP backend
|
103 | 103 |
|
104 |
| -To communicate with InfluxDB, you can choose the HTTP backend to be used configuring the appropriate feature: |
| 104 | +To communicate with InfluxDB, you can choose the HTTP backend to be used configuring the appropriate feature. We recommend sticking with the default reqwest-based client, unless you really need async-std compatibility. |
105 | 105 |
|
106 |
| -- **[hyper](https://github.com/hyperium/hyper)** (used by default) |
| 106 | +- **[hyper](https://github.com/hyperium/hyper)** (through reqwest, used by default), with [rustls](https://github.com/ctz/rustls) |
| 107 | + ```toml |
| 108 | + influxdb = { version = "0.4.0", features = ["derive"] } |
| 109 | + ``` |
| 110 | + |
| 111 | +- **[hyper](https://github.com/hyperium/hyper)** (through reqwest), with native TLS (OpenSSL) |
| 112 | + ```toml |
| 113 | + influxdb = { version = "0.4.0", default-features = false, features = ["derive", "use-serde", "reqwest-client"] } |
| 114 | + ``` |
| 115 | + |
| 116 | +- **[hyper](https://github.com/hyperium/hyper)** (through surf), use this if you need tokio 0.2 compatibility |
107 | 117 | ```toml
|
108 |
| - influxdb = { version = "0.4.0", features = ["derive"] } |
| 118 | + influxdb = { version = "0.4.0", default-features = false, features = ["derive", "use-serde", "curl-client"] } |
109 | 119 | ```
|
110 | 120 | - **[curl](https://github.com/alexcrichton/curl-rust)**, using [libcurl](https://curl.se/libcurl/)
|
111 | 121 | ```toml
|
|
0 commit comments