C Code Bundler for Codingame & Leetcode
This VS Code extension helps you bundle your C/C++ projects into a single source file so you can easily submit them to competitive programming platforms like Codingame or Leetcode.
✨ Features
Bundle C/C++ Files
Recursively combines all your local dependencies referenced via #include "file.h" into one file.
Clipboard Sync
Automatically copies the bundled output to your clipboard for instant pasting.
Local Server
Serves the bundled code on http://localhost:3333 for browser automation or testing.
Highly Configurable
- Remove comments automatically
- Strip debug logs (e.g.
fprintf(stderr, ...))
- Customizable server port
🚀 Usage
- Open a
.c or .cpp file in VS Code.
- Press
Ctrl+Shift+P and run Codingame: Bundle C Code.
- Or simply save the file (
Ctrl+S) while working on a C/C++ file (Auto-bundle).
- Paste the bundled code from your clipboard into Codingame or Leetcode.
⚠️ Important Reminder (Önemli Hatırlatma)
Tüm .h dosyalarınız main.c (veya ana .c/.cpp dosyanız) üzerinden erişilebilir olmalıdır.
- Bundler sadece
main dosyasına bağlı olan (#include zinciriyle ulaşılabilen) header ve source dosyalarını dahil eder.
main ile doğrudan veya dolaylı olarak ilişkilendirilmeyen .h / .c dosyaları çıktıya eklenmez.
- Bu nedenle:
// main.c
#include "utils.h" // ✅ utils.h main'e bağlı
#include "math_ext.h" // ✅ zincirle bağlı
// unused.h
// ❌ main tarafından include edilmezse bundle'a girmez
📌 İpucu: Codingame / Leetcode gönderiminden önce, tüm yardımcı fonksiyonların main → header → source zinciri içinde olduğundan emin olun.
🧠 Recommended Project Structure
project/
├── main.c
├── utils.h
├── utils.c
├── math_ext.h
└── math_ext.c
// utils.h
#ifndef UTILS_H
#define UTILS_H
void log_debug(const char* msg);
#endif
// main.c
#include "utils.h"
int main() {
log_debug("Hello Codingame");
return 0;
}
🛠 Configuration
You can customize the bundler behavior via extension settings:
removeComments: Strip all comments
removeDebugLogs: Remove fprintf debug logs
serverPort: Change local server port (default: 3333)
🎯 Designed For
- Codingame
- Leetcode
- CodinGame IDE-less workflows
- Competitive programming & interview prep
Enjoy fast, clean submissions! 🚀