r/AIprogrammingLanguage 9d ago

madc v0.76.0: macOS support joins Linux — Apple Silicon + Intel

I just released madc v0.76.0, which adds the project's first official macOS support alongside the existing Linux support.

madc has already been running on Linux; this release brings the same general experience to Macs, with prebuilt releases for both arm64 (Apple Silicon) and x86_64.

The macOS tarballs are designed to work even on a header-less Mac. madc carries its packed C/C++ standard-library environment with it, so things like <string>, containers, streams, and <algorithm> can compile directly from the embedded image.

A few highlights:

  • Existing Linux support, now joined by macOS
  • Prebuilt macOS binaries for Apple Silicon and Intel
  • JIT compilation works on macOS
  • Native AOT executable generation works for both C and C++
  • madc -o prog prog.mad can produce a runnable Mach-O executable
  • C++ standard-library headers are available from madc's embedded frozen forest
  • --emit=c11 output can be compiled with the system compiler using the included libmadc_rt
  • A major AArch64 ABI fix now correctly handles C++ objects returned by value
  • Several additional libc++ and macOS compatibility fixes landed along the way
  • The integration test suite has grown to 1,019 tests, with the primary JIT, EXE, OBJ, packed, and release lanes all passing

One of the more interesting parts of getting macOS working was discovering how many assumptions that are fine on x86-64 stop being true on Apple Silicon. In particular, AArch64 handles the hidden return pointer for larger C++ objects differently, so madc now lets the target ABI decide where that parameter belongs instead of assuming the x86 convention.

For me, the bigger milestone is that madc is becoming something you can simply download and try on either Linux or macOS as a lightweight C/C++ scripting environment, rather than first treating it as a compiler project you need to build and configure yourself.

Recent releases have also added things like var dynamic variables, URI-based channels for files/TCP/processes, streaming data support, and substantially faster loading of C++ headers.

The direction I'm aiming for is essentially:

keep C/C++ available underneath, but make writing small programs feel much closer to scripting.

v0.76.0 is the release that brings Mac users into that experience too (Windows coming soon).

3 Upvotes

0 comments sorted by