On Oct 9, while updating my list of Fortran tools, I tried the GitHub project f90c of SirPigari, a “Single executable Fortran 90 compiler written in Rust”, finding that it compiled some basic programs but failed on others. It generates native object code using Cranelift. By giving Codex and Claude programs to compile and language features to add, I have created a cross-platform compiler that implements much of Fortran 2023, excluding coarrays, summarized here. Implemented Fortran 2023 additions include conditional expressions and arguments, SIMPLE procedures, enumeration and enum types, TYPEOF/ CLASSOF declarations, and DO CONCURRENT reductions (currently executed sequentially). It also supports SPLIT, TOKENIZE, degree and half-revolution trigonometric intrinsics, and the AT edit descriptor for trimmed character output. Parameterized derived types have partial support, including KIND and LEN parameters, constructors, inheritance, and selected forms of runtime and deferred-length parameters. It runs on at least Windows x64, Linux x86-64 and macOS Apple Silicon.
On a few kernels it was about 2 times slower than gfortran. It has many warning and debugging options. It has interpreter and REPL modes you can try here. It’s an experiment to see if LLMs can write a Fortran compiler in Rust and is far from being a production compiler, but it may be useful in checking code with its debugging options and for trying new language features. Work is ongoing, and bug reports are welcome. It is GPL-3.0 licensed overall since f90c is, but 85% of the code is new and MIT licensed.