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.

Release engineering is exhausting so here's cargo-dist

262 pointsby ag_dubsover 2 years ago

16 comments

ZeroCool2uover 2 years ago
&quot;Alright so I&#x27;ve given you The Pitch of how this should work, but how does it actually work today? Well, yes, I wouldn&#x27;t announce this if not -- but there&#x27;s a lot of future work to do! Actually no I take that back, it&#x27;s definitely perfect. Those familiar with my broader oeuvre know this will absolutely be a perfectly crafted demo that avoids all the sharp corners of cargo-dist!&quot;<p>One of the most honest paragraphs ever written.<p>Seriously though, great tool and great write up. I hope something like this lands as an official cargo feature. Coming from mostly Python land at work with crazy dependencies for TF and PyTorch GPU support (On Windows sometimes!) makes me super jealous.
评论 #34624647 未加载
MuffinFlavoredover 2 years ago
I think this would benefit from an example repo that shows just Cargo.toml for a simple src&#x2F;main.rs with `fn main() { println!(&quot;Hello, world!&quot;); }` project with the simplest needed .github&#x2F;workflows&#x2F;foo.yaml possible to actually use this.<p>If it was in the article and I missed it I apologize.
评论 #34617750 未加载
IshKebabover 2 years ago
&gt; Congrats kid you&#x27;re A Release Engineer now and your life is hell. Enjoy debugging basic typos on a remote machine with 20 minute latency because you sure can&#x27;t run those Github CI bash-scripts-in-yaml files locally!<p>Yes! Why is this accepted??<p>Gitlab has a way of running CI locally (for Docker based builds anyway; who knows about Windows or Mac) but a) it doesn&#x27;t support the same features at the &quot;proper&quot; one (even basic ones like the `default` key) and b) they deprecated it!<p>Ok in fairness they&#x27;ve stated in a random comment that they won&#x27;t remove it before providing an alternative.... But still, how is this not a core feature of all CI systems?
评论 #34617429 未加载
评论 #34616613 未加载
评论 #34617513 未加载
评论 #34617161 未加载
评论 #34624524 未加载
评论 #34619283 未加载
Shared404over 2 years ago
&gt; (Did you know the warning you get on Windows isn&#x27;t about code signing, but is actually just a special flag Windows&#x27; builtin unzipping tool sets on all executables it extracts?)<p>My jaw hit the floor here.
评论 #34617364 未加载
chatmastaover 2 years ago
I&#x27;m really not a fan of the &quot;download the prebuilt binary from github releases&quot; workflow that&#x27;s been proliferating along with the popularity of Rust. It seems like a step backward in terms of secure package management, and it&#x27;s surprising to me that Rust doesn&#x27;t offer a more out-of-box experience for this, instead encouraging users to build from source. I understand the arguments for this, and I even find some of them convincing - namely, that the inverse problem of opaque intermediate binaries and object files would be much worse as it would cause a cascade of brittle builds and barely any packages would work.<p>But the fact remains that end users want to download a binary, and the common approach to this is to simply publish them to GitHub actions. Surely Cargo could offer a better option than this, while retaining the ability to build all packages from source (maybe you can only publish binaries to Cargo _in addition_ to the source files... or maybe Cargo.toml could include a link to GitHub releases, and Cargo could include a command for downloading directly from there.)<p>In the meantime, I&#x27;ve been considering publishing Rust binaries to npm (in addition to GitHub releases). I got the idea from esbuild, which is written in Go but distributed via npm. What do people think of this approach? Here&#x27;s a recent blog post [0] describing the setup.<p>[0] <a href="https:&#x2F;&#x2F;blog.orhun.dev&#x2F;packaging-rust-for-npm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.orhun.dev&#x2F;packaging-rust-for-npm&#x2F;</a>
评论 #34618755 未加载
评论 #34618744 未加载
评论 #34618352 未加载
评论 #34620751 未加载
评论 #34621031 未加载
评论 #34621384 未加载
samsquireover 2 years ago
There&#x27;s so much work to do to release software. Kind of explains why everything is a website.
评论 #34620159 未加载
braincodeover 2 years ago
How does this tool differ from release-plz?: <a href="https:&#x2F;&#x2F;github.com&#x2F;marcoIeni&#x2F;release-plz">https:&#x2F;&#x2F;github.com&#x2F;marcoIeni&#x2F;release-plz</a>
Animatsover 2 years ago
OK, after reading through all that, I still can&#x27;t tell if this can generate a Windows installer. Generating an installer is mentioned, but the examples seem to just generate a .tar file. Or maybe a .zip file. That&#x27;s not what non-programmer Windows users expect.<p>Rust does a good job of generating Windows binaries cross-platform. But the tools for generating Windows installers are not yet cross-plaform. Does this project improve that situation?
评论 #34621749 未加载
loveparadeover 2 years ago
Nearly all of these problems (except for maybe the Windows one) are solved by publishing a nix flake with your application and telling people to install that instead.<p>Not everyone uses nix, but I&#x27;d rather push its adoption than trying to build these kind of solutions for all possible language ecosystems when a general solution already exists and works great.
评论 #34622651 未加载
评论 #34622517 未加载
bin_bashover 2 years ago
If you happen to install a lot of things with cargo, check out cargo-binstall: <a href="https:&#x2F;&#x2F;github.com&#x2F;cargo-bins&#x2F;cargo-binstall">https:&#x2F;&#x2F;github.com&#x2F;cargo-bins&#x2F;cargo-binstall</a><p>It&#x27;ll fetch the binary release from the repo so you don&#x27;t have to compile it yourself.
ElijahLynnover 2 years ago
This article does a really good job of setting up the &quot;why&quot; right in the beginning.
Chmouelover 2 years ago
i really enjoy goreleaser <a href="https:&#x2F;&#x2F;github.com&#x2F;goreleaser&#x2F;goreleaser&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;goreleaser&#x2F;goreleaser&#x2F;</a> and use it with rust <a href="https:&#x2F;&#x2F;github.com&#x2F;chmouel&#x2F;snazy&#x2F;blob&#x2F;main&#x2F;.goreleaser.yaml#L11">https:&#x2F;&#x2F;github.com&#x2F;chmouel&#x2F;snazy&#x2F;blob&#x2F;main&#x2F;.goreleaser.yaml#...</a> combined with build matrix <a href="https:&#x2F;&#x2F;github.com&#x2F;chmouel&#x2F;snazy&#x2F;blob&#x2F;main&#x2F;.github&#x2F;workflows&#x2F;releaser.yaml#L33">https:&#x2F;&#x2F;github.com&#x2F;chmouel&#x2F;snazy&#x2F;blob&#x2F;main&#x2F;.github&#x2F;workflows...</a>
评论 #34619196 未加载
jphover 2 years ago
Awesome thank you. I&#x27;m adding it to the cargo favorites list: <a href="https:&#x2F;&#x2F;github.com&#x2F;sixarm&#x2F;cargo-install-favorites">https:&#x2F;&#x2F;github.com&#x2F;sixarm&#x2F;cargo-install-favorites</a><p>Tiny feedback:<p>- Can you consider changing &quot;git add .&quot; to be explicit e.g. &quot;git add Cargo.toml .github&#x2F;workflows&#x2F;release.yml&quot;?<p>- How about modifying Cargo.toml to add cargo-dist as a dev-dependency? I know it&#x27;s not strictly necessary; it&#x27;s just very helpful for typical collaboration.
评论 #34618509 未加载
oconnor663over 2 years ago
Bend the curve!
docandrewover 2 years ago
Really impressive work. The description of “release engineering” really hit home in regards to the slow feedback cycle with everything CI&#x2F;CD.<p>Also, seeing the initial attempt fail because of a missing C dependency is a common problem with a lot of language-specific package managers.
Yoricover 2 years ago
Wow, that looks <i>extremely</i> useful! Thanks!