- Rust 98%
- Shell 2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .claude | ||
| .cursor | ||
| .gemini | ||
| .github | ||
| .windsurf | ||
| accumulate | ||
| acronym | ||
| affine-cipher | ||
| all-your-base | ||
| allergies | ||
| alphametics | ||
| anagram | ||
| armstrong-numbers | ||
| atbash-cipher | ||
| beer-song | ||
| binary-search | ||
| bob | ||
| book-store | ||
| bottle-song | ||
| bowling | ||
| circular-buffer | ||
| clock | ||
| collatz-conjecture | ||
| crypto-square | ||
| custom-set | ||
| decimal | ||
| diamond | ||
| difference-of-squares | ||
| diffie-hellman | ||
| dot-dsl | ||
| eliuds-eggs | ||
| etl | ||
| fizzy | ||
| flower-field | ||
| forth | ||
| gigasecond | ||
| grade-school | ||
| grains | ||
| grep | ||
| hamming | ||
| hello-world | ||
| high-scores | ||
| isbn-verifier | ||
| isogram | ||
| kindergarten-garden | ||
| knapsack | ||
| largest-series-product | ||
| leap | ||
| list-ops | ||
| luhn | ||
| luhn-from | ||
| luhn-trait | ||
| macros | ||
| matching-brackets | ||
| matrix | ||
| minesweeper | ||
| nth-prime | ||
| nucleotide-count | ||
| ocr-numbers | ||
| paasio | ||
| palindrome-products | ||
| pangram | ||
| parallel-letter-frequency | ||
| pascals-triangle | ||
| perfect-numbers | ||
| phone-number | ||
| pig-latin | ||
| poker | ||
| pov | ||
| prime-factors | ||
| protein-translation | ||
| proverb | ||
| pythagorean-triplet | ||
| queen-attack | ||
| rail-fence-cipher | ||
| raindrops | ||
| react | ||
| rectangles | ||
| reverse-string | ||
| rna-transcription | ||
| robot-name | ||
| robot-simulator | ||
| roman-numerals | ||
| rotational-cipher | ||
| run-length-encoding | ||
| saddle-points | ||
| say | ||
| scrabble-score | ||
| secret-handshake | ||
| series | ||
| sieve | ||
| simple-cipher | ||
| simple-linked-list | ||
| space-age | ||
| spiral-matrix | ||
| sublist | ||
| sum-of-multiples | ||
| tournament | ||
| triangle | ||
| two-bucket | ||
| variable-length-quantity | ||
| word-count | ||
| wordy | ||
| xorcism | ||
| yacht | ||
| .gitignore | ||
| CLAUDE.md | ||
| README.md | ||
My exercism rust track solutions
I use this repository also to experiment with AI/LLM prompts to solve the exercises.
Prompt within exercise root folder:
# Code Implementation
Implement all _instructions_ defined in `README.md` in the rust file:`src/lib.rs`.
## Enable all tests
Ensure all tests in the `tests` folder are NOT ignored and enabled.
## Test the code
Run all tests in the `tests` folder, after the implementation of the all _instructions_ in `src/lib.rs` is done.
## Ensure all tests pass
Make sure all tests pass successfully.
In case test(s) fail, adapt the code implementation and rerun all tests until all tests pass.
## Improve
Do better. Improve the code implementation and increase readability and reduce code complexity.
Claude Code
I used implementing the diamond challenge and the largest-series-product exercises. The .claude folder contains instructions that enable resolved exercises.
Copilot coding agent
I used implementing the Crypto Square exercise. This issue is notably brief compared to others, as the .github folder already includes Copilot prompts and agent instructions.
An earlier attempt was implementing the Wordy Exercise. During this implementation, the Copilot agent detects that no Copilot instructions were present in the repository and flagged this through a PR comment. This led to the creation of a dedicated issue:: ✨ Set up Copilot instructions.
With those instructions in place, I proceeded to implement the custom-set exercise. Interestingly, the existing exercism tests and instructions were already so comprehensive and well-structured that adding Copilot instructions didn’t significantly enhance the development experience. In both the Wordy and Custom Set exercises, the quality of the Exercism framework proved to be the dominant factor.
Windsurf IDE
Windsurf IDE successfully solved the luhn-from and atbash-cipher exercise. Also Windsurf solved the luhn-trait exercise with a much smaller previous version of the prompt.
Cursor IDE
Cursor IDE successfully solved the accumulate and list-ops exercise using its agent.
The result worked and was good code, still in one case clippy caused warnings (ba72c13).
A much smaller prompt:
Implement all _instructions_ defined in `phone-number/README.md` in the rust file:`phone-number/src/lib.rs`.
resolved the phone-number. Similar to above, the first implementation included clippy warnings (5c2175a)
Cursor ran multiple commands (cargo and others) and as a user, I had to confirm every of the requested commands.
Execution Process
Cursor's agent mode performed the following steps autonomously:
- Analyzed the exercise requirements from README.md
- Generated the implementation plan
- Implemented the solution in src/lib.rs
- Enabled all tests by removing #[ignore] attributes
- Executed cargo test to verify the solution
- Refactored the code for improved readability
- Re-tested to ensure refactoring didn't break functionality
User Interaction
- Approval Required: Each command execution (cargo test, file modifications) required user confirmation
- Transparency: All planned changes were shown before execution
- Control: User maintained full control over the process
Gemini CLI
Gemini cli is a terminal coding assitant that can solve exercism exercises: https://www.lotharschulz.info/2025/06/25/getting-started-with-google-gemini-cli-complete-setup-guide-and-rust-testing-experience/
Benchmark Harness Automation
You can auto-generate a Criterion benchmark scaffold for an exercise:
chmod +x .github/scripts/inject_benchmark.sh
.github/scripts/inject_benchmark.sh <exercise-dir> <function-name>
# Example:
.github/scripts/inject_benchmark.sh accumulate accumulate
This will:
- Copy the benchmark template
- Insert a benchmark calling the specified function
- Add
criterionto[dev-dependencies]if missing - Append a
[[bench]]section
Run benchmarks with:
cd <exercise-dir>
cargo bench
Copilot Prompt Taxonomy
| Role | File | Purpose |
|---|---|---|
| Core implementation | solve-exercise.md |
Main iterative solve loop (enable tests → implement → iterate) |
| Legacy alias | implement-exercise.md |
Deprecated; forwards to solve-exercise.md |
| Validation | validate-solution.md |
Post-implementation quality gates (tests, fmt, clippy, docs) |
| Idiomatic refinement | rust-idioms.md |
Refactor toward clear, idiomatic Rust |
| Performance | optimize-solution.md |
Benchmark & improve critical paths |
| Documentation | documentation.md |
Add/verify /// docs and README improvements |
| Troubleshooting | troubleshoot-tests.md |
Deep dive when failures persist after solve loop |
| TDD mode | test-driven.md |
Red → Green → Refactor workflow |
| Shared reference | shared-core-flow.md |
Minimal canonical sequence (referenced by others) |
Doc Enforcement
If agent.yml sets metadata.default.enforce_doc_on_public: true, CI will fail when
public items lack doc comments. To temporarily relax this, set the flag to false in
.github/copilot/agent.yml (not recommended for long-term hygiene).
Optimization Benchmarks
The optimize prompt assumes (but does not force) criterion usage. Use the injector script to scaffold when exploring performance changes:
.github/scripts/inject_benchmark.sh <exercise> <function>