Skip to content

feat(languages): add Rust, C++, and Go across all 452 algorithms - #35

Merged
reshinto merged 10 commits into
mainfrom
feat/rust-cpp-source-languages
Apr 8, 2026
Merged

feat(languages): add Rust, C++, and Go across all 452 algorithms#35
reshinto merged 10 commits into
mainfrom
feat/rust-cpp-source-languages

Conversation

@reshinto

@reshinto reshinto commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Expand language support from 3 (TypeScript, Python, Java) to 6 by adding Rust, C++, and Go source files with synchronized @step: markers for all 452 algorithms
  • Add per-algorithm correctness tests for all 5 non-TypeScript languages (Python, Java, Rust, C++, Go)
  • Add shell-based test runner infrastructure with npm scripts and CI matrix support

Changes

  • Infrastructure: Update SupportedLanguage type, LANGUAGE_LABELS, MONACO_LANGUAGE_MAP, LANGUAGE_EXTENSIONS, buildLineMapFromSources() for 6 languages
  • 1,356 new source files: 452 algorithms × 3 new languages (.rs, .cpp, .go) with matching @step: markers
  • 2,260 new test files: 452 algorithms × 5 languages (Python, Java, Rust, C++, Go) with correctness assertions
  • 452 index.ts updates: New ?raw imports + expanded supportedLanguages and sources
  • 5 test runner scripts: scripts/test-{python,java,rust,cpp,go}.sh + npm test:* commands
  • source-loader.test.ts: 36 Vitest tests for multi-language source loading
  • Documentation: All docs, rules, and agent configs updated for 6-language support
  • Fix stale fixtures: Tracker tests and Storybook stories updated for expanded SupportedLanguage type

Test plan

  • npm run typecheck — clean
  • npm run lint — clean
  • npm run format — clean
  • npm test — 911 test files, 8,056 tests passing
  • npm run test:python — run Python correctness tests (requires Python 3)
  • npm run test:java — run Java correctness tests (requires JDK)
  • npm run test:rust — run Rust correctness tests (requires rustc)
  • npm run test:cpp — run C++ correctness tests (requires g++)
  • npm run test:go — run Go correctness tests (requires Go toolchain)

reshinto added 10 commits April 8, 2026 04:17
…2 algorithms

Expand language support from 3 (TypeScript, Python, Java) to 6 by adding
Rust, C++, and Go source files with synchronized @step markers for all 452
algorithms. Includes per-algorithm correctness tests for all 5 non-TypeScript
languages and shell-based test runner infrastructure.

- Update SupportedLanguage union type, LANGUAGE_LABELS, MONACO_LANGUAGE_MAP,
  LANGUAGE_EXTENSIONS, and buildLineMapFromSources for 6 languages
- Add 1,356 new source files (452 x 3 languages) with matching @step markers
- Add 2,260 per-algorithm test files (452 x 5 languages: Python, Java, Rust, C++, Go)
- Add 5 shell test runner scripts and npm test:* commands
- Add source-loader.test.ts with 36 Vitest tests
- Update all documentation, rules, and agent configs for 6-language support
- Fix tracker and storybook test fixtures for expanded SupportedLanguage type
…structure test files

- Add Dockerfile.test with all 6 toolchains (Node 22, Python 3.12, Java 21, Rust, g++, Go)
- Add docker-compose.test.yml with per-language test services
- Add docker:test:* npm scripts for zero-install test execution
- Add sharded CI jobs for Python, Java, Rust, C++, Go in ci.yml and deploy.yml
- Optimize CI shards per language (Python 2, Java 4, Rust 8, C++ 4, Go 4)
- Move 2,260 language test files from sources/ to algorithm directories
- Update test imports: Python sys.path, C++ #include, Rust include!, Java javac -d, Go source copy
- Fix 8 C++ portability issues (missing includes for GCC on Linux)
- Fix 52 source files with stray export keywords
- Fix contains-duplicate and contains-duplicate-ii imports to use ?fn plugin
- Update test scripts with --shard and --workers support
- Update README, docs/testing.md, docs/deployment.md, docs/contributing.md
…y subdirectories

- Move 36 tracker files from flat src/trackers/ into 11 category subdirs
  (arrays, dynamic-programming, graph, hash-maps, heaps, linked-lists,
  matrices, sets, stacks-queues, strings, trees)
- Move 32 visualizer files from flat src/components/visualization/ into
  matching category subdirs
- Update barrel src/trackers/index.ts with grouped re-exports
- Update VisualizationPanel.tsx imports to new subdir paths
- Update 452 pipeline story imports to new visualizer paths
- Fix 21 direct bst-operation-tracker imports to use barrel
- Add 5 new story files: PalindromeVisualizer, TransformVisualizer,
  DistanceVisualizer, FrequencyVisualizer, TrieVisualizer
- base-tracker.ts and VisualizationPanel.tsx stay at their roots
- Zero step-generator changes (barrel absorbs restructuring)
…ocumentation

- Move 3,616 files (7 test files + 1 story per algorithm) into __tests__/ subdirs
- Update all relative imports: TS (../sources/, ../step-generator), Python
  (sys.path ../ sources), C++ (#include ../sources/), Rust (include! ../sources/)
- Update Java/Go test scripts for ../sources/ compilation paths
- Add rendered SVG architecture diagrams (architecture-overview, data-flow,
  state-management) replacing Mermaid code blocks
- Update docs/architecture.md with high-level code architecture diagram,
  algorithm directory layout, project structure tree
- Update docs/testing.md with __tests__/ paths, story count 488, test locations
- Update docs/contributing.md with new directory structure and story paths
- Update docs/deployment.md CI job table with per-language shard counts
- Update .claude/CLAUDE.md, rules/architecture.md, rules/testing.md,
  rules/storybook.md for new file organization
…iciency

- Compress CLAUDE.md: collapse Rules, Testing, Git Workflow sections into
  one-liner references to canonical rules/ files (~400 tokens saved/session)
- Fix CLAUDE.md key path: add missing <technique>/ level
- Deduplicate agents: qa-tester, senior-engineer, technical-writer now
  reference rules/ instead of repeating coverage, language, educational lists
- Deduplicate skills: tdd, verification, feature-dev, security-coverage-audit
  now reference rules/ for thresholds, E2E convention, language lists
- Fix feature-dev directory tree for __tests__/ and 6 languages
- Prune PLAN.md: remove ghost files, stale context, hardcoded file count,
  update hooks listing to match actual 20 hooks
- Move enabledPlugins management from settings.json to settings.local.json
- Clear stale one-off permissions from settings.json
- Expand demo to 5 scenes showcasing diverse visualizers: Bubble Sort
  (array bars), step-by-step control, Dijkstra (grid wavefront),
  BST In-Order (tree), BFS (graph)
- Add playFor() helper to reduce scene boilerplate
- Fix step-forward crash by resetting before stepping
- Output: 640px wide, 12fps, 4.45MB GIF (under 5MB target)
…sections

- Remove all hardcoded algorithm/category/story/test counts from docs
  (452, 488, ~950, 17 plugins, 13 hooks, etc.) — these go stale on every
  algorithm addition. Counts kept only in algorithms-catalog.md (the catalog)
- Fix claude-system.md: remove duplicate code-simplifier plugin, remove
  hardcoded counts from section headers
- Condense README.md: remove per-category breakdown paragraph, simplify
  Docker/test sections, merge Development System + Plan sections
- Deduplicate Docker test image description (deployment.md references
  testing.md instead of repeating)
- Replace testing.md pre-commit section with 2-line reference to contributing.md
- Condense contributing.md Common Pitfalls from 47 lines to 6 + link to
  debugging.md
- Condense architecture.md trade-offs from ~40 lines to ~10, remove counts
  from project structure tree
- Replace debugging.md VisualState table with reference to glossary.md
- Remove hardcoded tracker count from glossary.md
- Render step-generation-flow.svg and line-mapping-flow.svg from
  debugging.md Mermaid diagrams
- Replace code blocks with image references for universal rendering
- All docs now use pre-rendered SVGs instead of Mermaid code blocks
SVG images don't render in VS Code markdown preview. Replaced all 5
diagram SVGs with PNGs and updated references in architecture.md and
debugging.md.
…nal files

Every educational.ts file now has an algorithm-specific Mermaid diagram
in the howItWorks section, bringing coverage from 128/452 to 452/452.
Diagrams use a standardized 3-color scheme (green/cyan/amber) and are
rendered at runtime by the MermaidDiagram React component.
@reshinto
reshinto merged commit 73479ee into main Apr 8, 2026
63 checks passed
@reshinto
reshinto deleted the feat/rust-cpp-source-languages branch April 8, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant