AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Xmake Build Cache

skill-xmake-io-xmake-skills-xmake-build-cache · by xmake-io

Use when configuring or debugging xmake's local build cache (built-in, replaces ccache) or the remote compile cache service (shared across machines via `xmake service --ccache`). Covers enabling/disabling, fallbacks to external ccache, remote cache server/client setup, and cache cleaning.

No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add skill-xmake-io-xmake-skills-xmake-build-cache

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-xmake-io-xmake-skills-xmake-build-cache)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Xmake Build Cache? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Xmake Build Cache (Local & Remote)

Xmake has a built-in compile cache that speeds up rebuilds by reusing object files. Two flavors:

  • Local cache — on by default, per-machine, cross-platform (GCC/Clang/MSVC). Replaces ccache for most users.
  • Remote cache — a shared server that machines can push/pull objects from. Like Mozilla sccache but cross-platform.

Both use the same --ccache name on the CLI — --ccache= is xmake-speak for "C/C++ build cache", not the ccache tool specifically.

1. Local cache (default)

Enabled automatically. No setup required. Since v2.6.6, xmake uses its own built-in local cache; before that it shelled out to the system ccache.

Toggle

xmake f --ccache=n           # disable for this project
xmake f --ccache=y           # re-enable

Use external ccache instead

If you specifically want the third-party ccache tool (e.g. for CI cache sharing with non-xmake builds):

xmake f --ccache=n --cxx="ccache g++" --cc="ccache gcc"
xmake

Note the --ccache=n — disables xmake's built-in cache so the two don't stack.

Benefits of the built-in cache over external ccache

  • Cross-platform. Works on Windows/MSVC; ccache doesn't.
  • No subprocess overhead. Xmake does the lookup in-process — no per-file ccache fork.
  • Integrated state. Xmake already tracks dependencies, so cache keys are tighter.

Cache location

  • Local cache directory: ~/.xmake/cache/ (cross-project shared).
  • Clean it:

``bash xmake g --clean # nuclear: wipe global cache ``

2. Remote cache service

Shared cache server. First developer to compile uploads objects; everyone else downloads them. Big win for CI + team setups.

Start the server

xmake service --ccache                     # foreground
xmake service --ccache -vD                 # verbose
xmake service --ccache --start             # daemonize
xmake service --ccache --stop
xmake service --ccache --restart

First run creates ~/.xmake/service/server.conf and prints a generated token.

Server config (~/.xmake/service/server.conf)

{
    remote_cache = {
        listen = "0.0.0.0:9692",
        workdir = "/Users/ruki/.xmake/service/server/remote_cache"
    },
    known_hosts = { },
    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
    tokens = {
        "590234653af52e91b9e438ed860f1a2b"
    }
}
  • listen — host:port to bind.
  • workdir — cache storage on the server.
  • tokens — list of allowed client tokens. Generate more with xmake service --gen-token.
  • known_hosts — optional IP allowlist (harden access).

Client config (~/.xmake/service/client.conf)

{
    remote_cache = {
        connect = "cache.internal:9692",
        token   = "590234653af52e91b9e438ed860f1a2b"
    }
}

Connect and use

cd myproject
xmake service --connect --ccache          # just the cache service
xmake service --connect --distcc --ccache # combine with distributed compile
xmake                                      # builds as usual, cache hits are transparent

Cache hits show up in output as the normal "cache compiling" line — xmake pulls from the remote server instead of compiling.

Disconnect / clean

xmake service --disconnect --ccache
xmake service --clean --ccache             # wipe this project's cache on the server
xmake clean --all                          # (connected) also cleans remote cache

Timeouts

If the server network is flaky, add timeouts so clients fall back to local compilation instead of hanging:

{
    remote_cache = {
        connect_timeout = 5000,
        send_timeout    = 5000,
        recv_timeout    = 5000,
    }
}

Unit: milliseconds. Works on both server and client sides.

3. Inspecting cache behavior

xmake -v                         # verbose: shows `cache compiling` vs normal lines
xmake --rebuild                  # force full rebuild, bypass cache
xmake -rv                        # rebuild verbose

In the build log:

  • cache compiling — served from cache (local or remote).
  • compiling (plain) — cache miss, actually compiled.
  • distcc compiling — delegated to a distcc server (see xmake-distributed-compilation).

Pitfalls

  • --ccache=n but cache still active. You disabled the xmake built-in, but if CXX=ccache g++ is in the env, ccache is still interposing. unset CXX CC or point at the raw compiler.
  • Remote cache hanging the build. Add connect_timeout / send_timeout / recv_timeout so the client degrades to local on network trouble.
  • Token mismatch. Every server restart does not regenerate tokens, but the first run does. If you nuke ~/.xmake/service/, all clients need the new token.
  • Cache is project-scoped on the server. Cleaning "the cache" cleans only the current project (by workdir hash). xmake service --clean --ccache inside a different project only affects that project.
  • Compiler version must match. Cache keys include the compiler identity. A cache filled by gcc-11 on one box won't hit for gcc-12 on another — that's correct, not a bug.

When to branch out

  • Distributing the actual compile jobs across machines (not just caching) → xmake-distributed-compilation
  • Remotely compiling a project on a single server (no distribution) → xmake-remote-compilation
  • Every other build-speed knob (parallelism, unity build, PCH, etc.) → xmake-build-optimization

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.