{"id":51,"date":"2020-03-03T20:28:29","date_gmt":"2020-03-03T20:28:29","guid":{"rendered":"https:\/\/joshtest04.wordpress.com\/2020\/03\/03\/the-most-frustrating-habits-of-rust-crate-maintainers\/"},"modified":"2025-05-05T20:23:51","modified_gmt":"2025-05-05T19:23:51","slug":"the-most-frustrating-habits-of-rust-crate-maintainers","status":"publish","type":"post","link":"https:\/\/fevered.earth\/index.php\/2020\/03\/03\/the-most-frustrating-habits-of-rust-crate-maintainers\/","title":{"rendered":"The most frustrating habits of Rust crate maintainers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Rust has a fantastic and well developed universe of 3rd-party crates which will help you develop almost any application, right up until they suddenly won\u2019t. Here are four ways in which you will be suddenly and deeply frustrated while learning this exciting new language.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Weak typing is a documentation-specific feature.<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">One of the unique aspects of Rust is the subtle but specific control over the movement of data under the \u2018borrow\u2019 system, which provides tough but fair oversight of access to information. To work effectively in this system, you need to know all about your data types, their capabilities, their restrictions, their lifetimes and much else\u200a\u2014\u200aespecially if you want to pass them into and out of functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the idiomatic documentation style, in which you\u2019d be forgiven, encountering the language, for believing that the whole thing was weakly typed all along:<\/p>\n\n\n\n<figure class=\"wp-block-image wp-caption\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/800\/1*4TbTc-kRduUN5n0dNGL3oA.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\"><em>Taken (with apologies) from the <\/em><strong><em>rand <\/em><\/strong><em>crate book, the most popular rust&nbsp;crate.<\/em><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Members of the community will be happy to inform you that compiler error messages are the fastest source of correct type name information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. The new version is completely different and we\u2019re all using it now.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoying all the conveniences afforded to you by this popular crate? Well, watch out, because that\u2019s the deprecated 0.15 package.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s right, despite being at the end of a 32-crate long chain locking you in to 0.15, main development\u200a\u2014\u200aand somehow a bulk of users\u200a\u2014\u200aare focused on 0.16 now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The API is fundamentally incompatible, usually due to the start or end of support for a platform you\u2019re not interested in, and all of the dependencies are partially updated\u200a\u2014\u200aif at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. \u201cI have made excellent progress on this in a private branch seven months ago\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oh no\u200a\u2014\u200ayou\u2019re using your fancy new Rust crate, but it won\u2019t interop with another similarly fancy API or library that you\u2019re also using! In fact, they\u2019re mutually exclusive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, there\u2019s a GitHub issue for tracking this already, and some smart young grouse is making very perceptive comments and hinting that the solution is just around the corner\u200a\u2014\u200aseven months ago, with radio silence and the fork set to private ever since.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. You shouldn\u2019t, and therefore you can\u2019t.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Code, colleagues and convenience will often contrive to back you into a corner on some proposed feature or extension. It\u2019s ugly, but there\u2019s no other way to do it without necessitating some fundamental restructuring of your application. You sigh as you open your box of ugly hacks and set about patching it up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately, you hit a blocker\u200a\u2014\u200asome Rust package you depend on is complaining loudly about the exact thing you\u2019re intending to do, and is blocking the build. Time to take to the airwaves, and search social media to see if there\u2019s any quick way around this one. The replies comes quickly and in force: \u201cyou shouldn\u2019t, and therefore you can\u2019t\u201d. Whether or not there\u2019s a technical barrier to solving your problem, there\u2019s an organic barrier that will be just as effective. Computers are machines of infinite flexibility, but that may not hold for your fellow coders.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(Double points if there is a workaround available in the interface, but it\u2019s been unmaintained to the point where it no longer works correctly.)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">A disclaimer, of course, that this list is at the very least wildly unfair on the good work usually done for free by package maintainers and the community around Rust, whose contribution to problems I\u2019ve needed fixing absolutely outweighs their contribution to problems that have made me swear loudly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rust has a fantastic and well developed universe of 3rd-party crates which will help you develop almost any application, right up until they suddenly won\u2019t. Here are four ways in which you will be suddenly and deeply frustrated while learning this exciting new language. One of the unique aspects of Rust is the subtle but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[94,97],"tags":[29,30,31],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-article","category-gamedev","tag-programming","tag-rust","tag-rustlang"],"_links":{"self":[{"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":1,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fevered.earth\/index.php\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}