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.

Precompiled binaries removed from serde v1.0.184

122 pointsby MallocVoidstaralmost 2 years ago

11 comments

veec_cas_tantalmost 2 years ago
See also: <a href="https:&#x2F;&#x2F;internals.rust-lang.org&#x2F;t&#x2F;pre-rfc-sandboxed-deterministic-reproducible-efficient-wasm-compilation-of-proc-macros&#x2F;19359" rel="nofollow noreferrer">https:&#x2F;&#x2F;internals.rust-lang.org&#x2F;t&#x2F;pre-rfc-sandboxed-determin...</a><p>Authors comment:<p>&gt;&quot;Someone else is always auditing the code and will save me from anything bad in a macro before it would ever run on my machines.&quot; (At one point serde_derive ran an untrusted binary for over 4 weeks across 12 releases before almost anyone became aware. This was plain-as-day code in the crate root; I am confident that professionally obfuscated malicious code would be undetected for years.)<p>He got some hate for that in the replies but I think it is a great point. Pardon my snark, but every &quot;security expert&quot; that voiced their opinion over the last couple of days, yet failed to recognize the situation for almost a month, should reassess their reaction once the anger subsides.<p>The current macro situation is dangerous (and wasteful), hopefully some real progress can be made.
评论 #37206138 未加载
评论 #37206864 未加载
评论 #37206854 未加载
评论 #37208467 未加载
评论 #37206383 未加载
hyperman1almost 2 years ago
I feel for him&#x2F;her. When you provide a usefull service in OSS, this is the result of the slightest transgression, real or imagined.<p>I also think this displays &#x27;emperors clothes&#x27; behaviour. In a perfect world, many eyeballs make all bugs shallow, and long term, it actually mostly works. But short term, we collectively severely fall short of our ideals. I think part of the harshness an OSS contributor receives in this kind of situation comes from everyone realizing we&#x27;ve been caught with our pants down.<p>It&#x27;s human to shoot the messenger, but let&#x27;s not forget this only happens because someone worked hard enough to make the whole world trust him or her.
mwcampbellalmost 2 years ago
Thanks to dtolnay for boldly doing what it took to make some real progress on the problem of proc macro compile times. It&#x27;s unfortunate that we reacted the way we did, driving him to abort the experiment. I&#x27;m sorry I contributed to the pile-on with my first comment on the infamous GitHub issue, the one I directed specifically at him. I&#x27;ll be slower to react next time.
评论 #37212385 未加载
X-Istencealmost 2 years ago
This provides some additional context for why the pre-built binary was added:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;serde-rs&#x2F;serde&#x2F;issues&#x2F;2584#issue-1858075241">https:&#x2F;&#x2F;github.com&#x2F;serde-rs&#x2F;serde&#x2F;issues&#x2F;2584#issue-18580752...</a><p>Due to the way that the derive feature was causing the dependency chain in Cargo to be longer than necessary, thereby making it impossible for cargo to compile multiple crates in parallel.
评论 #37214301 未加载
oeveralmost 2 years ago
&gt; eventually we&#x27;d like to use a first-class precompiled macro if such a thing becomes supported by cargo &#x2F; crates.io<p>Distributing binaries is what distributions are for. It does not matter if it is for macros or for the rest of a crate.<p>Anyone can write and publish a cargo plugin that provides binaries via a separate channel.<p><a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-prebuilt" rel="nofollow noreferrer">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-prebuilt</a> has been around for a while. (I&#x27;ve not used it, just looked for it now)
MallocVoidstaralmost 2 years ago
See <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37183361">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37183361</a>, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37189462">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37189462</a> for context.
joshkaalmost 2 years ago
See also the PR: <a href="https:&#x2F;&#x2F;github.com&#x2F;serde-rs&#x2F;serde&#x2F;pull&#x2F;2590&#x2F;files">https:&#x2F;&#x2F;github.com&#x2F;serde-rs&#x2F;serde&#x2F;pull&#x2F;2590&#x2F;files</a>
rcmealmost 2 years ago
I’ve seen a lot of complaints about this. I would love some insights into the author’s intentions, though. Why did they choose binary distribution? They must have had a reason.
评论 #37208939 未加载
klaussilveiraalmost 2 years ago
Is there a way to force cargo to compile dependencies instead of using binaries? Also, any way to force vendoring?
WirelessGigabitalmost 2 years ago
I think also one of the issues was that it wasn&#x27;t opt-in, it wasn&#x27;t deterministic from day one (I truly believe it should have), and it broke building when using git references as the detection was just triple based.
thereinalmost 2 years ago
Nice to see the maintainer stop being so stubborn.<p>I wish I could say this left a good taste in my mouth as a strong proponent of Rust.<p>Especially after dtolnay banned me on the repo after I commented on the PR. Can&#x27;t even give thumbs up on someone else&#x27;s comment let alone open an issue or a PR.<p>Interesting to see how glorified janitorial roles make people think they have some real power.<p>Just take a look at <a href="https:&#x2F;&#x2F;github.com&#x2F;andreisilviudragnea&#x2F;serde-blocked&#x2F;discussions&#x2F;1">https:&#x2F;&#x2F;github.com&#x2F;andreisilviudragnea&#x2F;serde-blocked&#x2F;discuss...</a><p>David went on a full on power trip rampage, going as far as banning people who participated with emojis on that PR from the serde org on GitHub.
评论 #37207090 未加载
评论 #37211012 未加载
评论 #37211415 未加载
评论 #37207646 未加载
评论 #37206905 未加载
评论 #37215067 未加载