Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cache the Rust build in CI

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
Half a day
Newbie friendliness
80/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, rust
Domain
ci-cd

Research direction

Start with the build job in .github/workflows/ci.yml, which runs fmt, clippy, test and build with no cache step. Read CONTRIBUTING for the commit-hash pinning rule, and check how Cargo.lock and rust-toolchain.toml are referenced. Add a cache keyed on those two files, then run the workflow twice on your fork, cold and warm, to show the speedup. Done means the warm run is faster, a Cargo.lock or toolchain change misses the cache, the deployment job does not share it, and CI is green.

Written by the indexing model from the issue text.

Description

enhancement good first issue help wanted

Written against commit 78d0a89; later commits may have moved things, so check the code first.

Size: Trivial

Description
Every CI run (each push, each pull request, and the weekly schedule) compiles soroban-sdk and its test utilities from scratch for cargo clippy, cargo test and stellar contract build. There is no cache step, so most of the run is dependency compilation. The same problem is tracked for the main repository (Sorogate/sorogate issue "Cache the Rust build in CI"); this repository has its own workflow.

Current state

  • .github/workflows/ci.yml: the build job runs fmt, clippy, test, build; no cache.
  • CONTRIBUTING says actions are pinned by commit hash with a version comment; a new action must be pinned the same way.

What to build
Add a cache for ~/.cargo registry and target/ keyed on Cargo.lock and the toolchain in rust-toolchain.toml (either Swatinem/rust-cache pinned by commit, or actions/cache with explicit paths; say why). Compare run times before and after on your fork (cold and warm) and put the numbers in the PR. The cache must not be shared with the deployment job.

Acceptance criteria

  • A warm run is measurably faster; numbers in the PR.
  • A change to Cargo.lock or the toolchain misses the cache.
  • Any new action is pinned by commit with a version comment.
  • CI is green.

Out of scope
Caching the Stellar CLI install.

Verification
Two consecutive runs on your fork.

Dominant language
Rust
Stars
2
Forks
2
Avg merge
2h 30m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Sorogate/example-consumer

All issues in Sorogate/example-consumer

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.