A shell script that compiles and executes C (and C++) source files in one command, enabling C scripting.
c is a shell script that compiles and executes C or C++ source files in a single command, turning them into runnable scripts. It solves the friction of separate compilation steps, allowing developers to quickly test and run C code as easily as Python or Bash scripts. The tool is compiler-agnostic, supporting GCC, Clang, TCC, or any compiler set via environment variables.
C and C++ developers who want a faster, more interactive workflow for testing small programs or writing portable C-based scripts. It's also useful for educators and hobbyists looking to simplify C code execution.
Developers choose c for its simplicity and speed—it eliminates manual compilation steps while retaining full control over the compiler and flags. Unlike `tcc -run`, it works with any compiler and adds features like shebang support and caching, making C feel as immediate as scripting languages.
Compile and execute C "scripts" in one go!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with any compiler via the $CC environment variable, letting users seamlessly switch between GCC, Clang, TCC, or others without lock-in.
Enables single-command execution and shebang support, making C/C++ files runnable like shell scripts for rapid testing and prototyping.
Implements a configurable caching system that stores compiled binaries to reduce latency on subsequent runs, with defaults and clear options.
Supports compiling multiple source files and passing compiler flags through quoted arguments or shebang syntax, though it requires careful syntax.
Installation involves manual steps or package managers, and shebang paths must match the installation location, which can break portability.
Lacks advanced build system capabilities like dependency resolution, incremental compilation, or project configuration, making it unsuitable for large codebases.
As a shell script, it may not provide detailed compilation errors or integrated debugging, relying on the underlying compiler's output.