polyglot-rust-c
Installation
SKILL.md
Polyglot Rust/C Programming
This skill provides structured guidance for creating source files that compile and execute correctly as both Rust and C/C++ programs.
Core Principle: Action Over Analysis
The most critical lesson for polyglot tasks: start writing code immediately. Polyglot programming requires empirical validation through actual compilation. Mental reasoning alone cannot account for all syntax edge cases across languages.
Recommended Workflow
Phase 1: Establish Working Environment
- Create the required output directory and file immediately
- Verify both compilers are available (
rustc --version,g++ --versionorgcc --version) - Set up a rapid iteration loop for testing
Phase 2: Incremental Development Strategy
Do not attempt to solve everything at once. Follow this progression: