{"slug": "rfortran-a-wip-fortran-compiler-and-interpreter-in-rust", "title": "RFortran: a WIP Fortran compiler and interpreter in Rust", "summary": "A developer known as Beliavsky built RFortran, a cross-platform Fortran compiler and interpreter written in Rust, by giving Codex and Claude programs to compile and language features to add on top of SirPigari's f90c project, which generates native object code via Cranelift. RFortran implements much of Fortran 2023 — excluding coarrays — including conditional expressions and arguments, SIMPLE procedures, enumeration types, TYPEOF/CLASSOF declarations and DO CONCURRENT reductions, and runs on Windows x64, Linux x86-64 and macOS Apple Silicon, though it was about 2 times slower than gfortran on a few kernels. The project is GPL-3.0 licensed overall because f90c is, with 85% of the code new and MIT licensed, and Beliavsky describes it as an experiment to see if LLMs can write a Fortran compiler in Rust, far from production-ready but potentially useful for checking code with its debugging options.", "body_md": "On Oct 9, while updating my list of Fortran tools, I tried the GitHub project [f90c](https://github.com/SirPigari/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](https://cranelift.dev/). 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](https://github.com/Beliavsky/rfortran/blob/main/docs/feature-status.md). 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](https://github.com/Beliavsky/rfortran/actions/workflows/release.yml) Windows x64, Linux x86-64 and macOS Apple Silicon.\n\nOn a few kernels it was about [2 times slower](https://github.com/Beliavsky/rfortran/blob/main/benchmarks/RESULTS.md) than gfortran. It has many [warning and debugging options](https://github.com/Beliavsky/rfortran/blob/main/docs/usage.md). It has interpreter and REPL modes you can try [here](https://beliavsky.github.io/rfortran/). 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.", "url": "https://wpnews.pro/news/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust", "canonical_source": "https://fortran-lang.discourse.group/t/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust/11277#post_1", "published_at": "2026-11-04 14:37:08+00:00", "updated_at": "2026-11-04 14:49:59.847383+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "artificial-intelligence"], "entities": ["RFortran", "Rust", "Fortran 2023", "f90c", "SirPigari", "Cranelift", "Codex", "Claude"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust", "markdown": "https://wpnews.pro/news/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust.md", "text": "https://wpnews.pro/news/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust.txt", "jsonld": "https://wpnews.pro/news/rfortran-a-wip-fortran-compiler-and-interpreter-in-rust.jsonld"}}