#sccache

2025-04-28

Dear #rust folks, it looks like #sccache is failing to handle or rebuild a crate which uses a build.rs to generate sources into OUT_DIR.

For some reason, after getting built the first time, the cache then fails to include the generated code in OUT_DIR as well, resulting in subsequent builds failing.

Has anyone dealt with this before?

2024-11-05

I want to use #Lychee (a link check written in #Rust) on #CircleCI. Doing just `cargo install lychee` took 5min, so I searched the internet and got advised I should use #sccache to cache dependencies or what.

Now it takes 13min, because `cargo install sccache` takes 7min and `cargo install lychee` takes 5.5min 🤦‍♂️

Anyone has an idea how to install a Rust thing to a machine in a reasonable time or how to cache the binary or something?

mgorny-nyan (on) :autism:🙀🚂🐧mgorny@pol.social
2024-08-18

No więc walczę z upierdliwą paczką Rusta w #Gentoo, której testy się sypią, cholera wie dlaczego. Częścią walki jest konieczność budowania w kółko od zera tej samej paczki. Zainstalowałem więc #SCCache, żeby to trochę przyspieszyć. Ogólnie, nie jest to szczególnie użyteczne narzędzie, bo działa tylko wtedy, kiedy za każdym razem ścieżki do plików są identyczne, ale w tym szczególnym przypadku powinno pomóc. I na początku pomagało.

A potem zaczęło się dziać coś dziwnego. SCCache uruchamia sobie jakiś proces w tle. Kiedy ninja kończy już z jednym wywołaniem `cargo build`, to ten proces sobie wisi w tle i blokuje ninję przed budowaniem kolejnego celu. I za każdym razem muszę ręcznie ten proces ubijać. Tyle z przyspieszenia.

#RustLang

mgorny-nyan (he) :autism:🙀🚂🐧mgorny@treehouse.systems
2024-08-18

So I'm fighting this damn #RustLang package whose test suite fails in #Gentoo for no apparent reason. My fight involves rebuilding the damn thing repeatedly, so I've installed #SCCache to speed this up. While it's not very useful in general, since it requires exact path match, it certainly sounded like something that would speed up repeatedly building the same damn thing. And it did, at first.

Then something weird started happening. SCCache keeps spawning a background process. Whenever ninja is done doing a specific `cargo build` invocation, this process remains hanging and prevents ninja from proceeding. I need to SIGTERM it every single time it happens. So much for speedup.

2024-07-29
Your intution is good.

#sccache offers enough improvement that one can be sure it's operating. However, even with a #Rust build cache that isn't filled, I've seen a build-time reduction of 50% only under ideal conditions and it seems to be closer to 14% in the average case.

For what it's worth, both numbers come from multi-hour builds that ought to have plenty of redundancy for a build cache to squeeze out. However, I've seen other comments online that make points similar to yours.

Regarding the welcome to the crab world, I'm pleased to see a number of interesting tools appear that, in many cases, simply build and work once things are in order. And they do build offline for me now, which is a plus.

It seems similar to the #Go ecosystem in some respects. I've become attached to a few Go stalwarts such as "gitea", "mlr", and "rclone", and I imagine that similar Rust projects will grow in number and will reach critical mass.

I'm not shy to be a CLI guy and these have fallen out of the Rust sky like CLI pie so far:

alacritty - I'm using this one right now.
coreutils - Same as "busybox" but for Rust.
dog - Instead of "dig". Sure, why not.
lfs - Similar to "df -m" but output is more readable.
macchina - It's not "conky", but it has the basics. Plus a Tux.
mdcat - MD render cat is all that.
names - Fun name generator for repos, etc.
netavark - I gather that "podman" needs this now.
netscanner - Unexpectedly nice network scanner TUI.
pastel - This is certainly colorful.
procs - Credible alternative to "htop".
rg - I've heard about this one and look forward to trying it.
sd - Useful supplement to "sed".
csvlens and xsv - Useful supplements to "mlr".
zet - Useful supplement to "uniq".
Image of a robotic crab.
2024-03-13

A new mentorship program for #sccache is on the way!

This time, I'll be mentoring on how to implement a storage check bypass in sccache. It will be an easy #RustLang task for newcomers. Interested?

Apply by commenting on the issue. I'll get in touch with you

github.com/mozilla/sccache/iss

GripNewsGripNews
2023-12-24

🌘 GitHub - mozilla/sccache: sccache是具有雲端存儲功能的ccache
➤ sccache - Shared Compilation Cache
github.com/mozilla/sccache
sccache是一款類似於ccache的編譯器快取工具,可將快取結果存儲在本地磁碟或多個雲端存儲後端之一。
+ 這個標題讓我對這個開源項目有了更清楚的瞭解,謝謝你提供的翻譯!
+ 總結非常簡潔明瞭,讓我對此開源項目有了初步的認識,期待能瞭解更多相關詳情。

Gabriele Svelto [moved]gabrielesvelto@fosstodon.org
2023-11-02

I haven't seen announced here in the fediverse yet, but version 0.6.0 of #sccache was just released:

github.com/mozilla/sccache/rel

sccache is a compilation-caching tool that can massively speed up your builds (and save power!) both locally and in CI. It supports both C/C++ and Rust and is very easy to use. If you're compiling a lot of stuff everyday you should definitely give it a try.

2023-10-27

@xuanwo 对于你的《为什么你该试试 Sccache?》一文,我有了一个疑惑:#sccache 是以文件为单位的,那会不会遇到 #GithubActionCacheService 的 rate limit 呢?

Magic #Nix Cache 的文档里提到,超过 #GHA Cache limit 时会遇到429错误。你的博文里也提到,旧的 #rust cache 粒度更粗,不用担心 #Github action cache limit.

ref:
xuanwo.io/reports/2023-04/
github.com/DeterminateSystems/

2023-10-10

@xuanwo

I have a question about your work #sccache and #OpenDAL.

To determine if the file is cached in GitHub Action[1], the logic is implemented in sccache or opendal?

My X Problem[2]: I want to cache #Nix within #GitHubAction. AFAIK, current solutions (github.com/nix-community/cache) will consider `/nix` as a whole object, causing "Caches are isolated between branches". Besides, the cost of downloading a big cache is not negligible.

[1]: xuanwo.io/reports/2023-04/scca
[2]: en.wikipedia.org/wiki/XY_probl

2023-03-18

So happy that my project has received a PR for #sccache

github.com/Endle/fireSeqSearch

2023-03-05

Wichtigste Eigenschaft eines Compiler-Caches: Geschwindigkeit, Geschwindigkeit und letztendlich Geschwindigkeit.

Tja, und dann ist das feature-überladene New Kid on the Block gut 25% langsamer, als der alte Platzhirsch. Bei warmem, perfekt befüllten Cache wohlgemerkt. Von der unfassbar schlimmen Performance bei kaltem Cache mag ich überhaupt nicht anfangen...

#CCache vs. #SCCache
#fail #bloatware

2023-02-17

Hello, all users of #sccache. I submit a proposal to create a MSRV policy of sccache, welcome to take a look 🥳.

github.com/mozilla/sccache/iss

2023-02-12

Today I added webdav support for #rust #sccache! After this PR sccache can upload cache to ccache HTTP backend or #bazel remote caching service.

github.com/mozilla/sccache/pul

2023-02-08

The #Rust community is so efficient, I ran into an ICE last night raising a PR for #sccache to see what was going on today, and the PR for the fix has already been raised. 😂

github.com/rust-lang/rust/pull

2023-01-28

给自己的 #Rust 项目 #fireSeqSearch 的 GitHub Action 加上了 #sccache 。不知道这算不算第一批使用了新特性[2]的项目。

博客里简单介绍 blog.zhenbo.pro/2023/01/27/rus

感谢 @xuanwo 的工作!
[2]: github.com/mozilla/sccache-act

2022-12-28

A new proposal to address the problem raised by misconfigured #rust #sccache.

Welcome for review!

github.com/mozilla/sccache/iss

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst