TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Quick Rust Test Runner for VSCode

1 点作者 fcoury大约 2 年前
I have been coding in Rust now for almost a year and, coming from other programming languages I always missed having a way to quickly run tests in VSCode. The `rustAnalyzer.run` option never worked very well for me, as it didn&#x27;t seem to work consistently and one of the things I really wanted to work was the ability to execute the last test over and over again.<p>So I ended up scratching my own itch and I just recently put together this extension that allows you to trigger the test that you have the cursor in by quickly pressing a keystroke.<p>On top of that, and maybe the the most useful feature, is that it remembers which test you last executed, so you can just press another keystroke to re-trigger that test. So let’s say you’re working on a test and you need to go back and forth into the code being tested, you can avoid to do so with that keystroke.<p>It also supports both cargo test and cargo watch as an option.<p>The code doesn&#x27;t use the language server, and identifies tests by parsing the code around the cursor, which makes it very bug prone as it is right now. Unfortunately there&#x27;s a whole ongoing discussion[1] that explains why it&#x27;s hard to achieve that at the moment.<p>The name of the extension as it is right now is a bit unfortunate, as we had another project with the same name launch a couple of days ago, but if you want to play with it here it is:<p>- Extension - <a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=fcoury.runst" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=fcoury.r...</a><p>- Source Code - <a href="https:&#x2F;&#x2F;github.com&#x2F;fcoury&#x2F;runst">https:&#x2F;&#x2F;github.com&#x2F;fcoury&#x2F;runst</a><p>Let me know your thoughts.<p>-- [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;language-server-protocol&#x2F;issues&#x2F;944">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;language-server-protocol&#x2F;issues...</a>

暂无评论

暂无评论