TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reflections on Learning Rust by Building Punchtop

115 pointsby p4lindromicaover 6 years ago

2 comments

Arnavionover 6 years ago
&gt;The most frustrating part of using Clippy is that it did not force a reanalysis of all packages in my cargo workspace when invoked multiple times.<p>This is because the author used `#[warn(clippy::all)]` instead of `#[deny]`. Warnings do not fail the build, so subsequent rebuilds will be no-ops. If you&#x27;re at the stage where you&#x27;ve fixed regular compilation errors and are only fixing clippy lints, you should probably change that to `#[deny]`. (I personally keep it at `#[deny]` from the start.) Or run clippy as `cargo clippy -- -Dwarnings` to treat warnings as errors.<p>&gt;Linking to code units in rustdoc was hard to do correctly since there were so many ways to do it.<p>If you&#x27;re planning to publish the crate to crates.io and are okay with relying on docs.rs to host the docs, then you can rely on the fact that docs.rs uses a nightly rustdoc and use nightly-rustdoc-specific features. Specifically you can use<p><pre><code> [`Foo`] </code></pre> to create a link to whatever `Foo` happens to be in the code scope.<p>&gt;My one complaint is that `RUST_LOG=debug cargo run` dumps all of the verbose debug logs from cargo while your program is being built.<p>You would use the env_logger builder to parse a different env var like &quot;PUNCHTOP_LOG&quot;, instead of the default &quot;RUST_LOG&quot;.
评论 #19204986 未加载
评论 #19204704 未加载
评论 #19205243 未加载
teknicoover 6 years ago
&quot;Punchtop is an audio game&quot;<p>No, it is not: it is a drinking game (as the Wikipedia page linked by the author clearly states). Music is only incidentally used to mark the passing of time: a timer works just as well.<p>Here is what is usually meant by &quot;audio game&quot;: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Audio_game" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Audio_game</a>