elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
702 stars 72 forks source link

[DOCS] Document that the 'tokio' runtime is required #80

Closed njam closed 4 years ago

njam commented 4 years ago

Please describe the documentation

I understand this crate requires the tokio runtime. It would be nice to note that somewhere in the readme.

Describe where the documentation should for

In the readme's "getting started" section: https://github.com/elastic/elasticsearch-rs#getting-started

Additional context I tried using this crate with the std-async runtime, but it didn't work:

thread 'main' panicked at 'not currently running on the Tokio runtime.'
[...]
  35: <hyper_tls::client::HttpsConnecting<T> as core::future::future::Future>::poll
             at /src/github.com-1ecc6299db9ec823/hyper-tls-0.4.1/src/client.rs:144
  36: core::future::poll_with_context
             at /rustc/699f83f525c985000c1f70bf85117ba383adde87/src/libcore/future/mod.rs:84
  37: reqwest::connect::Connector::connect_with_maybe_proxy::{{closure}}
             at /src/github.com-1ecc6299db9ec823/reqwest-0.10.4/src/connect.rs:346
[...]
russcam commented 4 years ago

Hey @njam, thanks for opening. The reqwest HTTP client that this library uses makes use of the tokio runtime, so will add a note to indicate