ARM64 Fortran on purpose

The toolchain that exists because fortsh forced the issue.

armfortas is a bespoke Apple Silicon Fortran stack built because existing compilers did not hold up on ARM64 for fortsh. The point is not novelty. The point is owning the source path from .f90 to a runnable binary and fixing the bugs ourselves.

The docs here are written against the current codebase, including the driver, submodules, and test harnesses, rather than relying only on top-level marketing copy.

$git clone --recurse-submodules git@github.com:FortranGoingOnForty/armfortas.git
$cd armfortas
# if you already cloned without submodules:
$git submodule update --init --recursive

GitHub

Repository Stats

Stars
Forks
Open issues
Last commit

Source of truth is the public GitHub API for the armfortas repository.

Why this exists

fortsh exposed a practical gap on Apple Silicon.

The project README spells the motivation out plainly: gfortran and flang were not reliable enough on ARM64 for the real-world language features fortsh depends on, especially allocatable strings, C interop, and layout-sensitive behavior.

armfortas exists to make that failure mode tractable. Frontend, IR, optimizer, assembler, runtime, and linker work all stay in a codebase small enough to read, audit, and change.

Own the stackNo LLVM frontend, no borrowed backend, no “wait for upstream”.
Debug with sourceEvery stage is legible enough to instrument, test, and fix directly.
Target the real machineThe stack is built around ARM64 Mach-O and Apple Silicon workflows.

Components

Three repos, one toolchain.

Toolchain component

armfortas

Compiler front-end, semantic analysis, SSA IR, optimizations, ARM64 codegen, runtime integration, and the user-facing CLI.

  • Owns preprocess -> lexer -> parser -> sema -> IR -> codegen
  • Compiles single-file and multi-file Fortran entrypoints
  • Emits objects, assembly, IR, AST, tokens, and linked binaries

Toolchain component

afs-as

Standalone ARM64 assembler for macOS that parses assembly text, encodes instructions, and writes Mach-O object files.

  • Own parser, encoder, and Mach-O writer
  • Usable as a CLI tool and as a library for compiler integration
  • Backed by differential tests against Apple tooling

Toolchain component

afs-ld

Bespoke ARM64 Mach-O linker intended to remove the last opaque system dependency from the toolchain.

  • Reads .o, .a, .dylib, and .tbd inputs
  • Implements symbol resolution, layout, relocation, and synthetic sections
  • Exposes dump, map, and why-live surfaces for parity work