-
Notifications
You must be signed in to change notification settings - Fork 0
Home
madc is real C with the workflow of a scripting language.
Write C. Run it like a script. Ship it as a native Linux ELF executable. Embed it as a library.
No Makefile. No project ceremony. No VM. No bytecode. No fake runtime.
madc compiles C-family source directly to native x86-64 machine code, uses libc directly, caches compiled objects, and can produce real Linux binaries.
| Use madc as... | Command / API | What happens |
|---|---|---|
| A script runner | madc program.mad |
JIT-compiles to native x86-64 code and runs immediately |
| A native compiler | madc -o program program.mad |
Produces a Linux ELF executable |
| An embedded runtime | #include <libmadc/api.h> |
Hosts madc inside your own C/C++ application |
madc gives you the immediacy of a scripting language without giving up native C execution.
madc is not a C-flavoured scripting language, bytecode VM, or toy interpreter.
It compiles to real native x86-64 machine code. It uses libc directly. It supports ordinary C-style programs, pointers, structs, functions, headers, preprocessor directives, and native linking.
madc is still growing toward fuller modern C compatibility, including broader C23 coverage, but standards completeness is not what makes something “real C.”
K&R C was real C. ANSI C was real C. Embedded C compilers are real C. TinyCC is real C.
madc belongs on that spectrum: real C at the core, extended where useful, and improving rapidly.
A normal C-style program works exactly how you would expect:
#include <stdio.h>
int main() {
printf("hello, world\n");
return 0;
}Run it directly:
$ madc hello.mad
hello, worldOr build a native executable:
$ madc -o hello hello.mad
$ ./hello
hello, worldmadc also includes practical extensions and helper namespaces that make small programs faster and more pleasant to write.
#include <iostream>
int main() {
std::string csv = "alice,bob,charlie";
madc::array names;
php::explode(names, ",", csv);
php::sort(names);
std::string out;
php::implode(out, ", ", names);
std::cout << python::title(out) << std::endl;
return 0;
}$ madc names.mad
Alice, Bob, CharlieC gives you control. Scripting languages give you convenience.
madc is designed to give you both.
Use madc when you want to write a native program without setting up a project, Makefile, build system, or toolchain wrapper.
madc tool.madOne file. One command. Native execution.
madc emits real x86-64 machine code and can produce Linux ELF executables.
It is not interpreting your source code. It is not running a bytecode VM. It is compiling and running native code.
madc caches compiled object files, so repeat runs can skip unnecessary recompilation.
That makes it practical for script-like workflows while still using compiled native code.
madc includes embedded headers and namespace helpers inspired by languages like:
- PHP
- Python
- Perl
- Ruby
- JavaScript
- Rust
Use familiar utility functions without pulling in an entire scripting runtime.
madc can also be used through libmadc, allowing you to embed a C-like native scripting layer inside your own C/C++ applications.
This makes madc useful not only as a command-line compiler, but also as a runtime component for larger native systems.
- Real native x86-64 code generation
- Direct libc usage
- Linux ELF executable output
- JIT-style execution from source
- Object-file caching
- Preprocessor support
- Header support
- Structs, pointers, functions, and ordinary C-style programming
- Modern C compatibility work, including ongoing C23 support
- C++-style conveniences where useful
- Namespace-based helper functions
- Embedded standard headers
- Embeddable
libmadcAPI - Single-command script-like workflow
madc is for developers who like C, but want a faster workflow.
Use it when you want to:
- write small native utilities without setting up a project
- prototype systems code quickly
- build C-like scripts that compile to native machine code
- ship a single Linux executable
- embed a native scripting layer inside a C/C++ application
- use familiar helpers from PHP, Python, Perl, Ruby, JavaScript, and Rust
- experiment with modern C extensions without leaving native code behind
madc is not trying to replace GCC, Clang, or every production C toolchain.
Use GCC or Clang when you need mature, battle-tested, fully standards-focused compilation across large production codebases and many platforms.
Use madc when you want C with immediacy:
madc program.madIt is also not Python, Lua, JavaScript, or a scripting VM.
madc borrows the convenience of scripting workflows, but the result is native code.
- C Compatibility
- Modern Extensions
- Types
- Functions
- Pointers
- Structs
- Arrays
- Strings
- Control Flow
- Error Handling
- Namespace Overview
- madc Namespace
- php Namespace
- python Namespace
- perl Namespace
- ruby Namespace
- js Namespace
- rust Namespace
- JIT Runtime
- Object Cache
- ELF Output
- Embedding libmadc
- Native Linking
- Preprocessor
- Compiler Architecture
madc is under active development.
The goal is simple:
real C, native code, script-like workflow, modern convenience.
C, unbound.