Skip to content

Getting Started

Derek Snider edited this page Jul 23, 2026 · 3 revisions

Getting Started

New to madc? Start here.

What is madc?

madc (My Advanced Dialect of C) is a C-like programming language that JIT-compiles directly to native machine code — and can compile the same programs into standalone native executables. Write familiar C/C++ code, run it with a single command — no Makefile, no separate compile step.

madc can also generate native Linux ELF executables, and can be embedded as a library (libmadc) in your own C/C++ programs.

Quick path

  1. Install madc — build from source (~2 minutes)
  2. Write your first program — hello world and beyond
  3. Explore namespaces — madc's signature feature

Three ways to use madc

Script it

madc program.mad

JIT-compiles and runs your program in one step. Caches compiled OBJ files — repeat runs skip recompilation.

Ship it

madc -o program program.mad
./program

Generates a native Linux ELF executable. Real binary, no runtime dependency on madc.

Embed it

#include <libmadc/api.h>

madc::program pgm;
pgm.exec_file("script.mad");

libmadc brings madc scripting and 100+ multi-language functions into your own C/C++ applications.

What makes madc different?

  • Familiar syntax — if you know C, you know madc. C++ extras (streams, strings, STL) are built in.
  • Zero ceremony — no Makefile, no include-path configuration, 40+ standard headers embedded.
  • Multi-language namespacesphp::, perl::, python::, ruby::, js::, rust:: functions available with no imports.
  • Modern featureslambdas, defer, multiple returns, := inference.
  • 99% GCC torture test parity, zero standard-C failures — not a toy. Handles real C codebases (SMAUG 1.8, ~158k lines, boots).

Next steps

Clone this wiki locally