-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
Derek Snider edited this page May 19, 2026
·
2 revisions
madc <file.mad> [args...]JIT-compiles and runs the program. Any arguments after the filename are passed as argc/argv to main().
| Flag | Description |
|---|---|
-v / --verbose
|
Enable debug trace output (tokenizer, parser, compiler) |
-o <output> |
Generate a native ELF executable instead of JIT-running |
# Run a program
madc hello.mad
# Run with arguments
madc script.mad arg1 arg2
# Debug trace
madc -v hello.mad
# Compile to native executable
madc -o hello hello.mad
./helloMake .mad files directly executable:
#!/usr/bin/env madc
#include <stdio.h>
int main() {
printf("I'm a script!\n");
return 0;
}chmod +x script.mad
./script.madmadc caches compiled object files. The first run JIT-compiles your program; subsequent runs load from cache for faster startup. Caching is automatic — no flags needed.
- Installation — building madc from source
- Your First Program — getting started
-
Native Executables — more on
-oand ELF generation - ← Back to Home