No description
  • Rust 98%
  • Shell 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lothar Schulz f708ec8061
chore
clean up beads initial auto setup and commit
2026-07-26 18:23:49 +02:00
.claude chore 2026-04-18 23:23:48 +02:00
.cursor chore 2025-09-30 22:19:26 +02:00
.gemini Merge branch 'main' of github.com:lotharschulz/exercism-rust 2025-06-26 07:10:09 +02:00
.github delete 2025-09-26 22:09:06 +02:00
.windsurf chore 2025-09-30 22:19:26 +02:00
accumulate chore 2025-09-14 22:51:48 +02:00
acronym chore 2024-12-06 19:59:14 +01:00
affine-cipher chore 2025-09-21 08:26:31 +02:00
all-your-base chore 2024-12-17 09:25:52 +01:00
allergies chore 2024-12-19 21:18:37 +01:00
alphametics Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
anagram Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
armstrong-numbers Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
atbash-cipher chore 2025-09-26 20:04:31 +02:00
beer-song Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
binary-search doc 2024-12-25 23:48:28 +01:00
bob chore 2024-11-01 09:35:27 +00:00
book-store chore 2026-07-19 13:02:38 +02:00
bottle-song Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
bowling chore 2024-12-29 00:11:38 +01:00
circular-buffer doc 2026-03-16 22:21:16 +01:00
clock Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
collatz-conjecture Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
crypto-square Complete crypto-square implementation with all tests passing 2025-09-26 19:22:41 +00:00
custom-set Complete implementation of custom-set exercise 2025-09-06 09:52:12 +00:00
decimal doc 2026-07-22 18:22:41 +02:00
diamond chore 2025-09-28 19:59:53 +02:00
difference-of-squares Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
diffie-hellman Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
dot-dsl fix 2025-01-02 15:05:26 +01:00
eliuds-eggs chore 2024-11-24 07:51:50 +01:00
etl chore 2025-01-03 08:46:09 +01:00
fizzy fix 2026-02-02 20:51:48 +01:00
flower-field chore 2025-08-05 18:17:37 +02:00
forth chore 2026-02-28 22:35:46 +01:00
gigasecond Fix GitHub Actions workflow to handle individual exercise crates 2025-09-26 19:38:32 +00:00
grade-school chore 2025-01-17 23:34:20 +01:00
grains chore 2024-07-09 13:56:08 +02:00
grep chore 2026-07-26 18:23:49 +02:00
hamming Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
hello-world init 2023-10-13 09:32:08 +02:00
high-scores doc 2024-11-18 22:56:30 +01:00
isbn-verifier Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
isogram chore 2025-02-01 22:20:03 +01:00
kindergarten-garden chore 2024-11-19 08:30:00 +01:00
knapsack chore 2026-01-27 08:34:02 +01:00
largest-series-product chore 2025-09-28 21:02:47 +02:00
leap chore 2024-07-10 21:58:24 +02:00
list-ops chore 2025-10-02 22:19:00 +02:00
luhn Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
luhn-from chore 2025-10-02 21:06:24 +02:00
luhn-trait chore 2025-10-02 21:32:14 +02:00
macros chore 2026-02-09 22:47:35 +01:00
matching-brackets chore 2024-11-10 00:21:49 +01:00
matrix chore 2026-01-29 18:02:01 +01:00
minesweeper chore 2024-11-30 21:40:03 +01:00
nth-prime Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
nucleotide-count chore 2025-02-02 22:19:05 +01:00
ocr-numbers chore 2026-03-06 17:31:22 +01:00
paasio chore 2025-02-03 22:38:18 +01:00
palindrome-products Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
pangram chore 2024-07-05 22:39:49 +02:00
parallel-letter-frequency chore 2026-02-04 21:31:50 +01:00
pascals-triangle chore 2025-02-05 22:32:59 +01:00
perfect-numbers chore 2025-02-06 18:16:00 +01:00
phone-number chore 2025-10-02 22:31:46 +02:00
pig-latin Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
poker doc 2026-02-21 23:35:11 +01:00
pov chore 2026-02-17 11:29:07 +01:00
prime-factors chore 2024-10-29 13:19:54 +00:00
protein-translation chore 2025-07-06 09:48:43 +02:00
proverb Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
pythagorean-triplet chore 2026-02-02 21:04:56 +01:00
queen-attack Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
rail-fence-cipher chore 2025-12-12 23:27:01 +01:00
raindrops chore 2024-10-25 22:58:06 +01:00
react chore 2026-03-12 21:58:56 +01:00
rectangles chore 2026-03-24 23:33:08 +01:00
reverse-string Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
rna-transcription chore 2025-02-20 22:02:46 +01:00
robot-name chore 2025-06-25 20:29:31 +02:00
robot-simulator chore 2025-05-25 18:38:12 +02:00
roman-numerals chore 2025-12-27 23:40:55 +01:00
rotational-cipher doc 2026-01-14 23:01:34 +01:00
run-length-encoding Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
saddle-points chore 2025-03-06 21:47:46 +01:00
say Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
scrabble-score chore 2025-04-03 23:28:00 +02:00
secret-handshake chore 2026-01-23 15:23:12 +01:00
series chore 2024-11-29 00:07:36 +01:00
sieve chore 2025-04-23 13:53:10 +02:00
simple-cipher chore 2026-01-19 18:04:16 +01:00
simple-linked-list chore 2025-04-23 13:53:10 +02:00
space-age Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
spiral-matrix Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
sublist chore 2024-10-27 21:48:54 +00:00
sum-of-multiples chore 2024-10-31 22:24:07 +00:00
tournament Fix all workflow issues: formatting errors and syntax problems 2025-09-26 19:48:13 +00:00
triangle chore 2025-05-17 23:05:03 +02:00
two-bucket Fix all clippy warnings across the repository 2025-09-26 19:59:01 +00:00
variable-length-quantity chore 2025-05-25 18:44:50 +02:00
word-count doc 2026-01-20 21:36:25 +01:00
wordy chore 2025-09-06 11:39:43 +02:00
xorcism chore 2026-04-18 23:37:23 +02:00
yacht doc 2026-01-29 17:50:11 +01:00
.gitignore chore 2026-07-19 13:02:38 +02:00
CLAUDE.md chore 2025-09-28 19:51:33 +02:00
README.md doc 2026-01-13 22:49:21 +01:00

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 criterion to [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>