Skip to content

Commit e9d32b1

Browse files
committed
Update the README with info about Rust toolchains
Signed-off-by: Nick Cameron <nrc@ncameron.org>
1 parent bb044e6 commit e9d32b1

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

README.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ With this crate you can easily connect to any TiKV deployment, interact with it,
1212

1313
This is an open source (Apache 2) project hosted by the Cloud Native Computing Foundation (CNCF) and maintained by the TiKV Authors. *We'd love it if you joined us in improving this project.*
1414

15-
## Install
15+
## Using the client
1616

17-
There are no special requirements to use this. It is a Rust 2018 edition crate supporting stable and nightly.
17+
The TiKV client is a Rust library (crate). It requires version 1.36 of the compiler and standard libraries (which will be stable from the 4th July 2019, see below for ensuring compatibility).
1818

19-
To use this crate in your project, add it as a dependency in the `Cargo.toml` of your Rust project:
19+
To use this crate in your project, add it as a dependency in your `Cargo.toml`:
2020

2121
```toml
2222
[dependencies]
2323
# ...Your other dependencies...
24-
tikv-client = "~0.1"
24+
tikv-client = { git = "https://github.com/tikv/client-rust.git" }
2525
```
2626

27+
The client requires a Git dependency until we can [publish it](https://github.com/tikv/client-rust/issues/32).
28+
29+
There are [examples](examples) which show how to use the client in a Rust program.
30+
31+
The examples and documentation use async/await syntax. This is a new feature in Rust and is currently unstable. To use async/await you'll need to add the feature flag `#![async_await]` to your crate and use a nightly compiler (see below).
32+
2733
## Access the documentation
2834

2935
We recommend using the cargo-generated documentation to browse and understand the API. We've done
@@ -37,3 +43,31 @@ You can access the documentation on your machine by running the following in any
3743
cargo doc --package tikv-client --open
3844
# If it didn't work, browse file URL it tried to open with your browser.
3945
```
46+
47+
## Toolchain versions
48+
49+
To check what version of Rust you are using, run
50+
51+
```bash
52+
rustc --version
53+
```
54+
55+
You'll see something like `rustc 1.36.0-nightly (a784a8022 2019-05-09)` where the `1.36.0` is the toolchain version, and `nightly` is the channel (stable/beta/nightly). To install another toolchain use
56+
57+
```bash
58+
rustup toolchain install nightly
59+
```
60+
61+
Where `nightly` here is the channel to add. To update your toolchains, run
62+
63+
```bash
64+
rustup update
65+
```
66+
67+
To build your project using a specified toolchain, use something like
68+
69+
```bash
70+
cargo +nightly build
71+
```
72+
73+
Where `nightly` names the toolchain (by specifying the channel, in this case).

src/lib.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,12 @@
44
#![type_length_limit = "16777216"]
55
#![allow(clippy::redundant_closure)]
66

7-
//! TiKV Client for Rust.
8-
//!
9-
//! > Currently this crate is experimental and some portions (eg the Transactional API) are still
10-
//! > in active development. You're encouraged to use this library for testing and help us find
11-
//! > problems!
12-
//!
137
//! This crate provides a clean, ready to use client for [TiKV](https://github.com/tikv/tikv), a
148
//! distributed transactional Key-Value database written in Rust.
159
//!
1610
//! With this crate you can easily connect to any TiKV deployment, interact with it, and mutate the
1711
//! data it contains.
1812
//!
19-
//! This is an open source (Apache 2) project hosted by the Cloud Native Computing Foundation
20-
//! (CNCF) and maintained by the TiKV Authors. *We'd love it if you joined us in improving this
21-
//! project.*
22-
//!
23-
//! ## Install
24-
//!
25-
//! There are no special requirements to use this. It is a Rust 2018 edition crate supporting
26-
//! stable and nightly.
27-
//!
28-
//! To use this crate in your project, add it as a dependency in the `Cargo.toml` of your Rust project:
29-
//!
30-
//! ```toml
31-
//! [dependencies]
32-
//! # ...Your other dependencies...
33-
//! tikv-client = "~0.1"
34-
//! futures-preview = "0.3.0-alpha.15" # You'll need this later.
35-
//! ```
36-
//!
37-
//! Then run a `cargo build --package tikv-client` command to test building the crate.
38-
//!
39-
//! Next, you need to choose the API appropriate for your needs.
40-
//!
4113
//! ## Choosing an API
4214
//!
4315
//! This crate offers both [**raw**](raw/index.html) and

0 commit comments

Comments
 (0)