AppleBridge drives MPW and ToolServer to build 68K software inside the emulated Mac. The natural question is whether something better than MPW exists — but, thinking out of the box, that is the wrong question. AppleBridge does not need a better compiler; it needs a better automation surface. Re-asked that way, the field of alternatives sorts itself cleanly, and one genuinely unconventional option appears: stop compiling on the Mac at all. Captured as a design note on branch AppleBridge_mcp; not implemented.

The right axis: automation surface, not compiler quality

It is tempting to rank MPW’s successors by how good a compiler each is — and by that measure MPW loses to almost everything. But AppleBridge never cared about compile quality. Its defining constraint, the one that shaped the whole project, was automation: it must invoke a build tool without a human at the keyboard and read the result back over a wire.

That is exactly why this project uses ToolServer rather than the MPW Shell. The two run the same compiler; the difference is that ToolServer answers an Apple Event with the command’s output in the reply, while the MPW Shell only prints to a Worksheet window nobody is watching. ToolServer did not win on code generation — it won on having a scriptable, output-returning automation surface.

So the useful question is not “what compiles better than MPW?” but “what plugs into AppleBridge’s automation surface — and what new surfaces would a different tool open?” Asked that way, the candidates fall into two groups, because AppleBridge offers two attachment points.

AppleBridge exposes two surfaces

flowchart TB
    subgraph AB["AppleBridge"]
        SA["Surface A — DoScript / Apple-Event channel
command.c → 'misc'/'dosc' → a scriptable in-guest app"] SB["Surface B — deploy + LAUNCH + screenshot
mac_write_file → LAUNCH:<path> → runtime output"] end TS["ToolServer / MPW (today)"] --> SA CW["CodeWarrior"] --> SA TH["THINK C / Symantec C++"] --> SA R68["Retro68 (host-side GCC)"] --> SB SA --> OUT["build output harvested from the AE reply"] SB --> OUT2["binary runs in-guest; result read via screenshot / output"]
  • Surface A — the DoScript/Apple-Event channel. command.c sends a 'misc'/'dosc' DoScript event to ToolServer ('MPSX') and harvests the reply. Any AppleScript- or Apple-Event-scriptable build tool can occupy this slot in ToolServer’s place.
  • Surface B — the deploy-and-launch channel. The host can push a file in (mac_write_file), bring an app to the foreground (LAUNCH:<MacPath>), and read what happened (the screenshot path). This is the hook not for an in-guest compiler but for a binary compiled somewhere else.

Surface A is the conventional path: replace the in-guest tool. Surface B is the out-of-the-box one: change where compilation happens.

Surface A — scriptable in-guest compilers

The drop-in move is to keep AppleBridge’s architecture and swap the tool it drives.

CodeWarrior (Metrowerks) is the strongest candidate. It was the de-facto standard that displaced both THINK C and MPW, it targets 68K and PowerPC cleanly, and — decisively for this use — its IDE ships a comprehensive AppleScript dictionary: events to build a project, classes for the compiler and code generator, and explicit error processing, so a driver can trigger a build and read back the structured error list exactly as AppleBridge reads ToolServer’s reply today. There is an even gentler path: Metrowerks also shipped MPW-compatible command-line tools (a 68K compiler and linker that run as MPW tools), so AppleBridge could keep its existing ToolServer channel untouched and simply call the CodeWarrior compiler instead of SC. Either way, the integration cost is small: a different target, and the same harvest.

THINK C / Symantec C++ is the lighter, older option. THINK 6 is fully scriptable from AppleScript and Frontier, and Symantec C++ 7.0 added a scriptable project manager. It fits Surface A genuinely, but it is 68K-only and was eclipsed by CodeWarrior on every axis that matters here, so it is a fallback rather than a goal.

A THINK C scripting sample

Because the THINK Project Manager (creator 'KAHL') is itself scriptable, AppleBridge would drive it the same way it drives ToolServer: open the project, ask for a build, and harvest the error list from the reply. Schematically, the driving script is just:

tell application "THINK Project Manager"
    open "MeinMac:Dev:Hello:Hello.π"   -- the project file
    build current project              -- compile changed sources, then link
    set theErrors to errors of current project
    if (count of theErrors) is 0 then
        return "OK"                    -- clean: hand the app to AppleBridge's LAUNCH verb
    else
        return theErrors               -- harvested over Apple Events, like ToolServer's reply
    end if
end tell

(The exact terms come from the application’s AppleScript dictionary; the shape is what matters.) The interaction it models maps onto Surface A directly:

UML-Diagramm

The diagram is deliberately the same shape as AppleBridge’s existing ToolServer exchange — one Apple Event in, a structured reply out — which is the whole point: on Surface A, a new compiler is a new participant, not a new protocol.

The whole of Surface A shares one ceiling, though: it still compiles inside a 1990s Mac, with that machine’s RAM, disk, and speed — the constraints the rest of this series has been mapping. Which is what makes the second surface interesting.

Surface B — host-side cross-compilation (the out-of-the-box inversion)

Retro68 is a modern, GCC-based cross-compiler for classic 68K and PowerPC Macs. You build on a contemporary host — Linux, macOS, or FreeBSD — with current GCC and C++, under version control, at modern speed, and it emits a real Mac artifact: a MacBinary .bin, an HFS .dsk image, and a .APPL with its resource fork populated (it carries its own Rez). The compiled program then runs on the target Mac.

Dropped onto AppleBridge, Retro68 inverts the bridge’s role. Today AppleBridge is a compile driver: it pushes a command into an in-guest tool and fights to capture the output — the entire reason ToolServer mattered. Compile on the host instead, and that fight simply ends: capturing a compiler’s stdout/stderr on a modern OS is trivial. AppleBridge is demoted from compile-driver to deploy-and-run channel — push the finished binary in with mac_write_file, LAUNCH: it, and read the result through the screenshot path. The bridge’s hardest-won capability becomes unnecessary, and its other capabilities (file delivery, launch, screenshot) carry the workflow.

Two honest caveats keep this from being a free lunch:

  • Interfaces. Retro68’s bundled “Multiversal Interfaces” are incomplete and, notably, lack OpenTransport and MacTCP (and most of what came after System 7.0). So it is excellent for ordinary apps and tools — the things AppleBridge exists to help users build — but it cannot, today, easily build the networked daemon itself. The bridge would keep building its own plumbing the old way and use Retro68 for payloads.
  • Resource-fork delivery. A 68K application’s executable code lives in CODE resources in the resource fork. Retro68 emits MacBinary/.APPL/.dsk precisely to carry that fork — so AppleBridge’s delivery step must land both forks, e.g. by writing the MacBinary and decoding it Mac-side, rather than copying a flat data file. That is a concrete, bounded engineering task, not a triviality.

What doesn’t fit, and why

For completeness: HyperCard is richly AppleScript-scriptable but is not a compiled-software toolchain — it is the wrong category. Future BASIC, MacApp, and Macintosh Common Lisp are real but niche, with weak or no automation surface. vbcc/vasm can target 68K but is far less mature for classic Mac OS than Retro68. None offers a better fit to either surface than the three above.

Verdict: two complementary bets

The reframing pays off as two independent, non-competing moves:

  1. Upgrade Surface A with CodeWarrior. Immediately better in-guest builds, and near-drop-in — via its MPW-compatible command-line tools, AppleBridge keeps its exact ToolServer channel and changes only which compiler it calls. Cost: target a new tool and harvest its errors.
  2. Add a Surface-B fast path with Retro68. Modern host-side development, with AppleBridge as deploy-and-run; it dissolves the output-capture problem rather than improving it. Cost: resource-fork-aware delivery, and the understanding that it builds payloads, not (yet) the daemon.

The payoff line is the same one the rest of this series keeps arriving at: the integration points are AppleBridge’s two surfaces, not its compiler. The conventional improvement is a better tool on Surface A; the out-of-the-box one is to stop compiling on the Mac at all, and let the bridge do what it is uniquely good at — getting a binary onto a 1991 Macintosh and watching it run.


Status: design note on branch AppleBridge_mcp; not implemented. ToolServer/MPW over the DoScript channel remains the shipped, proven toolchain. The CodeWarrior and Retro68 directions sketched here build on the transport-widening and minimum-hardware notes — same method, applied to the build tool instead of the transport.