{"id":833,"date":"2019-08-08T00:00:00","date_gmt":"2019-08-08T00:00:00","guid":{"rendered":"https:\/\/en.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/"},"modified":"2021-10-11T21:02:07","modified_gmt":"2021-10-11T21:02:07","slug":"migrating-the-tikv-rust-client-from-futures-0-1-to-0-3","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/","title":{"rendered":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3"},"content":{"rendered":"<p>I recently migrated a small\/medium-sized crate from Futures 0.1 to 0.3. It was fairly easy, but there were some tricky bits and some things that were not well documented, so I think it is worth me writing up my experience.<\/p>\n<p>The crate I migrated is the <a href=\"https:\/\/github.com\/tikv\/client-rust\">Rust client<\/a> for the TiKV database. It is about 5500 LoC and uses futures fairly heavily (because it communicates with TiKV using gRPC and the interface to that is async).<\/p>\n<p>Asynchronous programming in Rust is a large area and has been in development for some time. One of the core parts is the <a href=\"https:\/\/github.com\/rust-lang-nursery\/futures-rs\">futures<\/a> library, a standard Rust library which provides data types and functionality for programming using futures. It is essential for asynchronous programming, but it is not everything you need &#8211; you also need libraries for driving the event loop and interacting with the operating system.<\/p>\n<p>Over the years, the futures library has changed a lot. A lot of older code was developed using the 0.1 series of releases and has not been updated. The more recent versions are the 0.3 series (futures-preview on crates.io). The reason for this divergence is that there are a lot of changes between 0.1 and 0.3. 0.1 is fairly stable, whereas 0.3 has been evolving rapidly. In the long term, 0.3 will turn into 1.0; parts of the library are moving into std, and the first parts have recently been stabilized (e.g., the <code>Future<\/code> trait).<\/p>\n<p>We want the Rust client to work with stable compilers, so we limited the core library to only use features which are stable or would be soon. We did use async\/await in our documentation and examples since it is so much more ergonomic, and will eventually be the recommended way to program asynchronously in Rust. As well as avoiding async\/await in our library, we also depend on crates which use futures 0.1, which means we needed to use the compatibility layer a lot. Therefore, this might not be a totally typical migration.<\/p>\n<p>I&#8217;m not an async expert and I think there might be ways we could make this migration (and the code in general) more idiomatic. If you have suggestions, please let me know on <a href=\"https:\/\/twitter.com\/nick_r_cameron\">Twitter<\/a>. If you&#8217;d like to contribute a PR, that would be even better! We would love to get more people involved with the <a href=\"https:\/\/github.com\/tikv\/client-rust\">TiKV client<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Mechanical_changes\"><\/span>Mechanical changes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>These changes were either &quot;search and replace&quot; changes, or didn&#8217;t require much thinking.<\/p>\n<p>The biggest change is that the 0.1 <code>Future<\/code> signature included an <code>Error<\/code> associated type and <code>poll<\/code> always returned a <code>Result<\/code>. In 0.3, the error type has been removed and if you want to handle errors you must do so explicitly. To preserve behavior, we need to change all occurrences of <code>Future&lt;Item=Foo, Error=Bar&gt;<\/code> to <code>Future&lt;Output=Result&lt;Foo, Bar&gt;&gt;<\/code> (note the name change from <code>Item<\/code> to <code>Output<\/code>). With that change, <code>poll<\/code> returns the same type and so there are no changes required when using futures.<\/p>\n<p>If you define your own futures, then you need to update their definitions too, considering whether you need to handle errors.<\/p>\n<p>There is a <code>TryFuture<\/code> type in futures 0.3 which is roughly equivalent to <code>Future&lt;Output=Result&lt;...&gt;&gt;<\/code>. However, it is best to avoid it as much as possible &#8211; using it means you have to convert between <code>Future<\/code> \uadf8\ub9ac\uace0 <code>TryFuture<\/code>. It has a blanket impl, which makes it easy to use some functions on these kind of futures by using the <code>TryFutureEx<\/code> trait.<\/p>\n<p><code>Future::poll<\/code> takes a new context argument in futures 0.3. Mostly, this just needs propagating through <code>poll<\/code> calls (and occasionally ignoring).<\/p>\n<p>Our dependencies are still using futures 0.1, so we have to convert between the two libraries. This is mostly not too difficult because futures 0.3 includes some compatibility shims and other utilities (<code>Compat01As03<\/code>, etc.). These must be used where we call into our dependencies.<\/p>\n<p>The <code>wait<\/code> method has been removed from the <code>Future<\/code> trait. This was a good idea since the method was  a bit of a footgun. It can be replaced by either <code>.await<\/code> \ub610\ub294 <code>executor::block_on<\/code> (note that the latter blocks the whole thread, not just the current future).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Pin\"><\/span>Pin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Futures 0.3 makes heavy use of the <a href=\"https:\/\/doc.rust-lang.org\/nightly\/std\/pin\/index.html\"><code>Pin<\/code><\/a> type, in particular for the type of <code>self<\/code> in the signature of <code>Future::poll<\/code>. Other than the mechanical change to signatures, I had to do a bit of juggling using <code>Pin::get_unchecked_mut<\/code> \uadf8\ub9ac\uace0 <code>Pin::new_unchecked<\/code> (both unsafe) to project fields of futures.<\/p>\n<p>Pinning is a subtle and complicated concept. I still don&#8217;t feel like I have a great grasp of it all. The best reference I&#8217;m aware of is the <a href=\"https:\/\/doc.rust-lang.org\/nightly\/std\/pin\/index.html\">std::pin docs<\/a>. I&#8217;ll try and summarize the ideas here (there are some important subtleties that I&#8217;m not going to touch on at all, and this is not intended to be a tutorial on pinning):<\/p>\n<ul>\n<li>\n<code>Pin<\/code> is a type constructor which only makes sense when applied to a pointer type, e.g., <code>Pin&lt;Box&lt;_&gt;&gt;<\/code>.<\/li>\n<li>\n<code>Pin<\/code> itself is a marker\/wrapper type (a bit like <a href=\"https:\/\/doc.rust-lang.org\/nightly\/std\/ptr\/struct.NonNull.html\"><code>NonNull<\/code><\/a>), not a pointer type. You should read <code>Pin&lt;Box&lt;Foo&gt;&gt;<\/code> as &quot;a pinned Box pointer to Foo&quot; or &quot;a Box&lt;Foo&gt; which is guaranteed to be pinned&quot;.<\/li>\n<li>If a pointer is pinned, that means that the value pointed to by the pointer will never be moved (moving happens when a non-<code>Copy<\/code> object is passed by value, or via <code>mem::swap<\/code>). Note that the value is allowed to move <em>before<\/em> the pointer is pinned, but not <em>after<\/em>.<\/li>\n<li>If a type implements the <code>Unpin<\/code> trait, it means that it never actually matters whether that type is moved or not. In other words, we can safely pretend that a pointer to that type is pinned, even when it is not.<\/li>\n<li>\n<code>Pin<\/code> \uadf8\ub9ac\uace0 <code>Unpin<\/code> are not built into the language at all, although some language features indirectly rely on pinning guarantees. Pinning is compiler-enforced without the compiler knowing anything about it. (This is really cool, and is a great demonstration of how powerful Rust&#8217;s trait system is for this sort of thing). It works like this: <code>Pin&lt;P&lt;T&gt;&gt;<\/code> only permits safe access to <code>P<\/code>, which does not permit moving any value that <code>P<\/code> points to, unless <code>T<\/code> implements <code>Unpin<\/code> (i.e., the programmer has asserted that <code>T<\/code> does not care about being moved). Operations which could allow a non-<code>Unpin<\/code> value to be moved (basically mutable access) is <code>unsafe<\/code>, and it is up to the programmer to not move anything and guarantee that nothing can be moved later in safe code.<\/li>\n<\/ul>\n<p>OK, back to the futures migration. Whenever you end up using unsafe methods on <code>Pin<\/code> you have to think about all of the above in order to ensure the pinning invariants. See the <a href=\"https:\/\/doc.rust-lang.org\/nightly\/std\/pin\/index.html\">std::pin docs<\/a> for more on how to reason about this. In many of the places I had to use field projection, the reason is to call <code>poll<\/code> on another future (sometimes indirectly). For that you need a pinned pointer and so you need <em>structural pinning<\/em> (i.e., you project a field of <code>Pin&lt;&amp;mut T&gt;<\/code> to <code>Pin&lt;&amp;mut FieldType&gt;<\/code>).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Functions\"><\/span>Functions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>An irritating aspect of the migration was that a lot of the names of functions (and types) in the futures library have changed. These name changes were sometimes hard to automate because the names are often shared with very common names in standard libraries. Some example name changes are <code>Async<\/code> to <code>Poll<\/code>, <code>Ok<\/code> to <code>ready<\/code>, <code>for_each<\/code> to <code>then<\/code>, <code>then<\/code> to <code>map<\/code>, \uadf8\ub9ac\uace0 <code>Either::A<\/code> to <code>Either::Left<\/code> (likewise, <code>B<\/code>\/<code>Right<\/code>).<\/p>\n<p>Sometimes the name stayed the same, but the semantics of the function changed slightly (or both!). A common change was taking a closure which returned a future that produces a <code>T<\/code> rather than returning a <code>T<\/code> itself.<\/p>\n<p>Many of the combinator functions moved from the <code>Future<\/code> trait to one of the extension crates. This is an easy issue to fix, but sometimes this fix is hard to deduce from the error message.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"LoopFn\"><\/span>LoopFn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The futures 0.1 library included a <code>LoopFn<\/code> future for handling futures which do something multiple times. It has been removed from futures 0.3, which, I believe, is because a <code>for<\/code> loop in an <code>async<\/code> function or using streams are better solutions in the long term. To make the migration straightforward, I created our own version of the 0.3 <code>LoopFn<\/code> future. This was mostly a copy\/paste job with some adjustments (e.g., to handle pinning projection): <a href=\"https:\/\/github.com\/tikv\/client-rust\/pull\/41\/commits\/6353dbcfe391d66714686aafab9a49e593259dfb#diff-eeffc045326f81d4c46c22f225d3df90R28\">code<\/a>. Later I converted several uses of <code>LoopFn<\/code> to use streams, which improved the code somewhat.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sink_send_all\"><\/span>Sink::send_all<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In a few places in the project, we use sinks. I found the migration of these much less easy than for futures. The trickiest issue was that <code>Sink::send_all<\/code> has changed. In 0.1, it took ownership of a stream and once everything is resolved, returned the sink and stream. In 0.3, it takes a mutable reference to the stream and returns nothing. I created our own <a href=\"https:\/\/github.com\/tikv\/client-rust\/pull\/41\/commits\/6353dbcfe391d66714686aafab9a49e593259dfb#diff-eeffc045326f81d4c46c22f225d3df90R68\">compatibility layer<\/a> to emulate 0.1 sinks with 0.3 futures. This wasn&#8217;t particularly difficult, but there might be a better way to do this.<\/p>\n<p>You can see the whole conversion in <a href=\"https:\/\/github.com\/tikv\/client-rust\/pull\/41\">Migrate to futures 0.3 from 0.1<\/a>. This article was originally posted at <a href=\"https:\/\/www.ncameron.org\/blog\/migrating-a-crate-from-futures-0-1-to-0-3\/\">Featherweight Musings<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This post introduces Nick&#8217;s experience in migrating the TiKV Rust client from Futures 0.1 to 0.3.<\/p>","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[6],"tags":[23,22],"class_list":["post-833","post","type-post","status-publish","format-standard","hentry","category-engineering","tag-rust","tag-tikv"],"acf":[],"featured_image_src":null,"author_info":{"display_name":"Nick Cameron","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/nick-cameron\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB<\/title>\n<meta name=\"description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Migrating the TiKV Rust Client from Futures 0.1 to 0.3&quot; here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB\" \/>\n<meta property=\"og:description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Migrating the TiKV Rust Client from Futures 0.1 to 0.3&quot; here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-08T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-11T21:02:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"714\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nick Cameron\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nick Cameron\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\"},\"author\":{\"name\":\"Nick Cameron\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/f88386e5cf10ec65cbb7a8f480740eb6\"},\"headline\":\"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\",\"datePublished\":\"2019-08-08T00:00:00+00:00\",\"dateModified\":\"2021-10-11T21:02:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\"},\"wordCount\":1425,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"keywords\":[\"Rust\",\"TiKV\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\",\"name\":\"Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"datePublished\":\"2019-08-08T00:00:00+00:00\",\"dateModified\":\"2021-10-11T21:02:07+00:00\",\"description\":\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \\\"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\\\" here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/f88386e5cf10ec65cbb7a8f480740eb6\",\"name\":\"Nick Cameron\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Nick Cameron\"},\"description\":\"Database Engineer\",\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/nick-cameron\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\" here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/","og_locale":"ko_KR","og_type":"article","og_title":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB","og_description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\" here.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2019-08-08T00:00:00+00:00","article_modified_time":"2021-10-11T21:02:07+00:00","og_image":[{"width":1440,"height":714,"url":"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png","type":"image\/png"}],"author":"Nick Cameron","twitter_card":"summary_large_image","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Nick Cameron","Est. reading time":"8\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/"},"author":{"name":"Nick Cameron","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/f88386e5cf10ec65cbb7a8f480740eb6"},"headline":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3","datePublished":"2019-08-08T00:00:00+00:00","dateModified":"2021-10-11T21:02:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/"},"wordCount":1425,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"keywords":["Rust","TiKV"],"articleSection":["Engineering"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/","url":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/","name":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3 | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"datePublished":"2019-08-08T00:00:00+00:00","dateModified":"2021-10-11T21:02:07+00:00","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Migrating the TiKV Rust Client from Futures 0.1 to 0.3\" here.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Migrating the TiKV Rust Client from Futures 0.1 to 0.3"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/f88386e5cf10ec65cbb7a8f480740eb6","name":"Nick Cameron","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Nick Cameron"},"description":"Database Engineer","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/nick-cameron\/"}]}},"grav_blocks":null,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/migrating-the-tikv-rust-client-from-futures-0-1-to-0-3\/\"><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Engineering<\/div><\/div><h5 class=\"card-resource__title\">Migrating the TiKV Rust Client from Futures 0.1 to 0.3<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=833"}],"version-history":[{"count":1,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/833\/revisions"}],"predecessor-version":[{"id":834,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/833\/revisions\/834"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}