{"action":"created","comment":{"url":"https://api.github.com/repos/tikv/rfcs/pulls/comments/233541847","pull_request_review_id":174979112,"id":233541847,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzU0MTg0Nw==","diff_hunk":"@@ -0,0 +1,389 @@\n+# Summary\n+\n+Introduce a full featured, official TiKV (and PD) Rust client. It is intended to be used as a reference implementation, or to provide C-compatible binding for future clients.\n+\n+# Motivation\n+\n+Currently, users of TiKV must use [TiDB's Go Client](https://github.com/pingcap/tidb/blob/master/store/tikv/client.go), which is not well packaged or documented. We would like to ensure that users can easily use TiKV and PD without needing to use TiDB.\n+\n+We think this would help encourage community participation in the TiKV project and associated libraries. During talks with several potential corporate users we discovered that there was an interest in using TiKV to resolve concerns such as caching and raw key-value stores.\n+\n+# Detailed design\n+## Supported targets\n+\n+We will target the `stable` channel of Rust starting in the Rust 2018 edition. We choose to begin with Rust 2018 so we do not need to concern ourselves with an upgrade path.\n+\n+We will also support the most recent `nightly` version of Rust, but users should not feel the need to reach for nightly unless they are already using it.\n+\n+## Naming\n+\n+The [Rust API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/naming.html) do not perscribe any particular crate name convention.\n+\n+We choose to name the crate `tikv_client` to conform to the constraints presented to us by the Rust compiler. Cargo permits `tikv-client` and `tikv_client`, but `rustc` does not permit `tikv-client` so we choose to use `tikv_client` to reduce mental overhead.\n+\n+Choosing to seperate `tikv` and `client` helps potentially unfamiliar users to immediately understand the intent of the package. `tikvclient`, while understandable, is not immediately parsable by a human.\n+\n+All structures and functions will otherwise follow the [Rust API Guidelines](https://rust-lang-nursery.github.io/api-guidelines/), some of which will be enforced by `clippy`.\n+\n+## Installation\n+\n+To utilize the client programmatically, users will be able to add the `tikv-client` crate to their `Cargo.toml`'s dependencies. Then they must use the crate with `use tikv_client;`. Unfortunately due to Rust’s naming conventions this inconsistency is in place.\n+\n+To utilize the command line client, users will be able to install the binary via `cargo install tikv-client`. They will then be able to access the client through the binary `tikv-client`. If they wish for a different name they can alias it in their shell.\n+\n+## Usage\n+\n+## Two types of APIs\n+TiKV provides two types of APIs for developers:","path":"text/2018-10-25-tikv-client-rust.md","position":37,"original_position":37,"commit_id":"aea8d8528ede77d66cabcf4e6207d52222b78978","original_commit_id":"aea8d8528ede77d66cabcf4e6207d52222b78978","user":{"login":"crazycoder1988","id":44204108,"node_id":"MDQ6VXNlcjQ0MjA0MTA4","avatar_url":"https://avatars3.githubusercontent.com/u/44204108?v=4","gravatar_id":"","url":"https://api.github.com/users/crazycoder1988","html_url":"https://github.com/crazycoder1988","followers_url":"https://api.github.com/users/crazycoder1988/followers","following_url":"https://api.github.com/users/crazycoder1988/following{/other_user}","gists_url":"https://api.github.com/users/crazycoder1988/gists{/gist_id}","starred_url":"https://api.github.com/users/crazycoder1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazycoder1988/subscriptions","organizations_url":"https://api.github.com/users/crazycoder1988/orgs","repos_url":"https://api.github.com/users/crazycoder1988/repos","events_url":"https://api.github.com/users/crazycoder1988/events{/privacy}","received_events_url":"https://api.github.com/users/crazycoder1988/received_events","type":"User","site_admin":false},"body":"New line","created_at":"2018-11-14T17:19:44Z","updated_at":"2018-11-14T17:35:17Z","html_url":"https://github.com/tikv/rfcs/pull/7#discussion_r233541847","pull_request_url":"https://api.github.com/repos/tikv/rfcs/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/comments/233541847"},"html":{"href":"https://github.com/tikv/rfcs/pull/7#discussion_r233541847"},"pull_request":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/tikv/rfcs/pulls/7","id":225694801,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1Njk0ODAx","html_url":"https://github.com/tikv/rfcs/pull/7","diff_url":"https://github.com/tikv/rfcs/pull/7.diff","patch_url":"https://github.com/tikv/rfcs/pull/7.patch","issue_url":"https://api.github.com/repos/tikv/rfcs/issues/7","number":7,"state":"open","locked":false,"title":"TiKV Rust Client RFC","user":{"login":"sunxiaoguang","id":3982329,"node_id":"MDQ6VXNlcjM5ODIzMjk=","avatar_url":"https://avatars2.githubusercontent.com/u/3982329?v=4","gravatar_id":"","url":"https://api.github.com/users/sunxiaoguang","html_url":"https://github.com/sunxiaoguang","followers_url":"https://api.github.com/users/sunxiaoguang/followers","following_url":"https://api.github.com/users/sunxiaoguang/following{/other_user}","gists_url":"https://api.github.com/users/sunxiaoguang/gists{/gist_id}","starred_url":"https://api.github.com/users/sunxiaoguang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunxiaoguang/subscriptions","organizations_url":"https://api.github.com/users/sunxiaoguang/orgs","repos_url":"https://api.github.com/users/sunxiaoguang/repos","events_url":"https://api.github.com/users/sunxiaoguang/events{/privacy}","received_events_url":"https://api.github.com/users/sunxiaoguang/received_events","type":"User","site_admin":false},"body":"Introduces the API design for a Rust client for TiKV.","created_at":"2018-10-25T09:56:43Z","updated_at":"2018-11-14T17:35:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8159282bf6143b477c1796250e99af3637c2518e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1127575477,"node_id":"MDU6TGFiZWwxMTI3NTc1NDc3","url":"https://api.github.com/repos/tikv/rfcs/labels/Final%20Comment%20Period","name":"Final Comment Period","color":"ff8e8c","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tikv/rfcs/pulls/7/commits","review_comments_url":"https://api.github.com/repos/tikv/rfcs/pulls/7/comments","review_comment_url":"https://api.github.com/repos/tikv/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tikv/rfcs/issues/7/comments","statuses_url":"https://api.github.com/repos/tikv/rfcs/statuses/aea8d8528ede77d66cabcf4e6207d52222b78978","head":{"label":"sunxiaoguang:tikv-client-rust","ref":"tikv-client-rust","sha":"aea8d8528ede77d66cabcf4e6207d52222b78978","user":{"login":"sunxiaoguang","id":3982329,"node_id":"MDQ6VXNlcjM5ODIzMjk=","avatar_url":"https://avatars2.githubusercontent.com/u/3982329?v=4","gravatar_id":"","url":"https://api.github.com/users/sunxiaoguang","html_url":"https://github.com/sunxiaoguang","followers_url":"https://api.github.com/users/sunxiaoguang/followers","following_url":"https://api.github.com/users/sunxiaoguang/following{/other_user}","gists_url":"https://api.github.com/users/sunxiaoguang/gists{/gist_id}","starred_url":"https://api.github.com/users/sunxiaoguang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunxiaoguang/subscriptions","organizations_url":"https://api.github.com/users/sunxiaoguang/orgs","repos_url":"https://api.github.com/users/sunxiaoguang/repos","events_url":"https://api.github.com/users/sunxiaoguang/events{/privacy}","received_events_url":"https://api.github.com/users/sunxiaoguang/received_events","type":"User","site_admin":false},"repo":{"id":154648226,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ2NDgyMjY=","name":"rfcs","full_name":"sunxiaoguang/rfcs","private":false,"owner":{"login":"sunxiaoguang","id":3982329,"node_id":"MDQ6VXNlcjM5ODIzMjk=","avatar_url":"https://avatars2.githubusercontent.com/u/3982329?v=4","gravatar_id":"","url":"https://api.github.com/users/sunxiaoguang","html_url":"https://github.com/sunxiaoguang","followers_url":"https://api.github.com/users/sunxiaoguang/followers","following_url":"https://api.github.com/users/sunxiaoguang/following{/other_user}","gists_url":"https://api.github.com/users/sunxiaoguang/gists{/gist_id}","starred_url":"https://api.github.com/users/sunxiaoguang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunxiaoguang/subscriptions","organizations_url":"https://api.github.com/users/sunxiaoguang/orgs","repos_url":"https://api.github.com/users/sunxiaoguang/repos","events_url":"https://api.github.com/users/sunxiaoguang/events{/privacy}","received_events_url":"https://api.github.com/users/sunxiaoguang/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sunxiaoguang/rfcs","description":"RFCs for changes to TiKV","fork":true,"url":"https://api.github.com/repos/sunxiaoguang/rfcs","forks_url":"https://api.github.com/repos/sunxiaoguang/rfcs/forks","keys_url":"https://api.github.com/repos/sunxiaoguang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunxiaoguang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunxiaoguang/rfcs/teams","hooks_url":"https://api.github.com/repos/sunxiaoguang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/sunxiaoguang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/sunxiaoguang/rfcs/events","assignees_url":"https://api.github.com/repos/sunxiaoguang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/sunxiaoguang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/sunxiaoguang/rfcs/tags","blobs_url":"https://api.github.com/repos/sunxiaoguang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunxiaoguang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunxiaoguang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunxiaoguang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunxiaoguang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/sunxiaoguang/rfcs/languages","stargazers_url":"https://api.github.com/repos/sunxiaoguang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/sunxiaoguang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/sunxiaoguang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/sunxiaoguang/rfcs/subscription","commits_url":"https://api.github.com/repos/sunxiaoguang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunxiaoguang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunxiaoguang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunxiaoguang/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sunxiaoguang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/sunxiaoguang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunxiaoguang/rfcs/merges","archive_url":"https://api.github.com/repos/sunxiaoguang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunxiaoguang/rfcs/downloads","issues_url":"https://api.github.com/repos/sunxiaoguang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/sunxiaoguang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/sunxiaoguang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/sunxiaoguang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunxiaoguang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/sunxiaoguang/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/sunxiaoguang/rfcs/deployments","created_at":"2018-10-25T09:55:47Z","updated_at":"2018-10-25T09:55:49Z","pushed_at":"2018-11-14T01:24:42Z","git_url":"git://github.com/sunxiaoguang/rfcs.git","ssh_url":"git@github.com:sunxiaoguang/rfcs.git","clone_url":"https://github.com/sunxiaoguang/rfcs.git","svn_url":"https://github.com/sunxiaoguang/rfcs","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tikv:master","ref":"master","sha":"7fdcd0baacac39cd14cf20d1f42656033b97f92b","user":{"login":"tikv","id":41004122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDA0MTIy","avatar_url":"https://avatars2.githubusercontent.com/u/41004122?v=4","gravatar_id":"","url":"https://api.github.com/users/tikv","html_url":"https://github.com/tikv","followers_url":"https://api.github.com/users/tikv/followers","following_url":"https://api.github.com/users/tikv/following{/other_user}","gists_url":"https://api.github.com/users/tikv/gists{/gist_id}","starred_url":"https://api.github.com/users/tikv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikv/subscriptions","organizations_url":"https://api.github.com/users/tikv/orgs","repos_url":"https://api.github.com/users/tikv/repos","events_url":"https://api.github.com/users/tikv/events{/privacy}","received_events_url":"https://api.github.com/users/tikv/received_events","type":"Organization","site_admin":false},"repo":{"id":145156191,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxNTYxOTE=","name":"rfcs","full_name":"tikv/rfcs","private":false,"owner":{"login":"tikv","id":41004122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDA0MTIy","avatar_url":"https://avatars2.githubusercontent.com/u/41004122?v=4","gravatar_id":"","url":"https://api.github.com/users/tikv","html_url":"https://github.com/tikv","followers_url":"https://api.github.com/users/tikv/followers","following_url":"https://api.github.com/users/tikv/following{/other_user}","gists_url":"https://api.github.com/users/tikv/gists{/gist_id}","starred_url":"https://api.github.com/users/tikv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikv/subscriptions","organizations_url":"https://api.github.com/users/tikv/orgs","repos_url":"https://api.github.com/users/tikv/repos","events_url":"https://api.github.com/users/tikv/events{/privacy}","received_events_url":"https://api.github.com/users/tikv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tikv/rfcs","description":"RFCs for changes to TiKV and its ecosystem","fork":false,"url":"https://api.github.com/repos/tikv/rfcs","forks_url":"https://api.github.com/repos/tikv/rfcs/forks","keys_url":"https://api.github.com/repos/tikv/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tikv/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tikv/rfcs/teams","hooks_url":"https://api.github.com/repos/tikv/rfcs/hooks","issue_events_url":"https://api.github.com/repos/tikv/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/tikv/rfcs/events","assignees_url":"https://api.github.com/repos/tikv/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/tikv/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/tikv/rfcs/tags","blobs_url":"https://api.github.com/repos/tikv/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tikv/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tikv/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tikv/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tikv/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/tikv/rfcs/languages","stargazers_url":"https://api.github.com/repos/tikv/rfcs/stargazers","contributors_url":"https://api.github.com/repos/tikv/rfcs/contributors","subscribers_url":"https://api.github.com/repos/tikv/rfcs/subscribers","subscription_url":"https://api.github.com/repos/tikv/rfcs/subscription","commits_url":"https://api.github.com/repos/tikv/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tikv/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tikv/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tikv/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tikv/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/tikv/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tikv/rfcs/merges","archive_url":"https://api.github.com/repos/tikv/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tikv/rfcs/downloads","issues_url":"https://api.github.com/repos/tikv/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/tikv/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/tikv/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/tikv/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tikv/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/tikv/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/tikv/rfcs/deployments","created_at":"2018-08-17T18:55:29Z","updated_at":"2018-11-14T09:21:27Z","pushed_at":"2018-11-14T12:10:32Z","git_url":"git://github.com/tikv/rfcs.git","ssh_url":"git@github.com:tikv/rfcs.git","clone_url":"https://github.com/tikv/rfcs.git","svn_url":"https://github.com/tikv/rfcs","homepage":"","size":30,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/7"},"html":{"href":"https://github.com/tikv/rfcs/pull/7"},"issue":{"href":"https://api.github.com/repos/tikv/rfcs/issues/7"},"comments":{"href":"https://api.github.com/repos/tikv/rfcs/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tikv/rfcs/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/tikv/rfcs/statuses/aea8d8528ede77d66cabcf4e6207d52222b78978"}},"author_association":"NONE"}}
{"actor":{"display_login":"crazycoder1988"}}