Crunchy Runner is a local compiler and code runner created with web technologies. It uses
node-pty
to create a terminal instance that users can interact with in the front end usingxterm.js
Update: Added support for C#, Java, Python, JavaScript, and Go.
This project was heavily inspired by the Programiz Online C Compiler, but it lacked themes and customizability. So, I decided to create something similar with more features.
Initially, it started as a weekend project where I learned how to connect the backend with the frontend using express.js
and web sockets.
Special thanks to Ehsanul Haque vaiya for this project idea. I had a great time brainstorming this one.
This project depends on node-pty
, which in turn depends on an older version of Node.js (<v18). If you are using a newer version of Node.js (≥v18), it is recommended to use Node Version Manager (nvm) to switch to the older version. In my case, Node v17.9.1 seems to work well with node-pty
.
If you are on Windows, you might need to install some additional tools first. Specifically these ones:
- Python
- Visual Studio Installer
Assuming you have the appropriate version of Node.js installed, run the following command to install the dependencies:
npm install
After that, run the following to see the project in action:
npm start
- Minimal Design
- 10+ Dark Themes
- Support for multiple languages (C, C++, C#, Java, Python, JavaScript, and Go)
- Code Editor powered by CodeMirror
- Real-time terminal emulation (I/O) using
node-pty
andxterm.js
IDEs like Code::Blocks come with bundled compilers for C-like languages. However, Crunchy Runner uses local compilers that are already installed on your system. So, you must install the compilers manually if your system doesn't have them.
Language | Software | Instructions |
---|---|---|
C, C++ | GNU Compiler Collection (GCC) | MSYS2 |
C# | C# Compiler (CSC) | Stack Overflow |
Java | Java Development Kit (JDK) | Official Site |
Python | Python | Official Site |
JavaScript | Node.js | Official Site |
Go | Go | Official Site |
The source code is licensed under MIT.