# Fortran Package Manager playground

**URL:** <https://fortran-lang.discourse.group/t/fortran-package-manager-playground/11199>\
**Category:** Announcements\
**Created:** [October 26, 2026, 5:54pm UTC](https://fortran-lang.discourse.group/t/fortran-package-manager-playground/11199 "2026-10-26T17:54:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Post date:** [October 26, 2026, 5:54pm UTC](https://fortran-lang.discourse.group/t/fortran-package-manager-playground/11199/1 "2026-10-26T17:54:17Z")

</div>

I have added several features to the [Fortran playground](https://beliavsky.github.io/fortran-playground/), particularly for comparing compiler behavior and trying libraries.

**Comparing compilers in the browser.** The **Compare compilers** interface lets you select several compilers and compile or run the same program with each, successively. It displays a summary of results and compilation/run times. You can inspect individual results, show all outputs together, or copy the complete report. By default, a compilation failure does not prevent trying the remaining compilers.

**Optional output comparisons.** You can compare outputs exactly, ignore whitespace differences, or use a numeric comparison with absolute and relative tolerances.

**External source files.** In Advanced and Compare modes, you can load Fortran source URLs. They are compiled in the order listed, followed by the program in the editor. This lets a short main program use modules or procedures maintained elsewhere. The Python runner now accepts HTTPS source URLs as well as local files.

**Editor improvements.** The editor now provides automatic indentation and deindentation for common Fortran constructs.

**Links that configure the playground.** Links can select the interface, compilers, example, standard, and preprocessing setting. For example, [this link opens Compare compilers with GNU, Intel, and Flang selected](https://beliavsky.github.io/fortran-playground/?interface=compare&compilers=gfortran,ifx,flang). Another example selects [GNU Fortran, the Fortran 2018 standard, preprocessing, and the arithmetic example](https://beliavsky.github.io/fortran-playground/?compiler=gfortran&standard=2018&preprocess=1&example=01_arithmetic). Opening a link configures the page without running code. Existing links that load source code still work.

There is also an experimental [FPM package playground](https://beliavsky.github.io/fortran-playground/fpm/). Supply a public GitHub package URL and either:

- Write a main program that uses the package.
- Build the package itself.
- Run one of its applications.
- Run its tests.

FPM mode uses gfortran 16.2 by default, with gfortran 17 (experimental), Intel ifx, and LLVM Flang also supported when enabled by the service. Each compiler builds the package and its dependencies from scratch. Five examples demonstrate numerical integration, root finding, interpolation, TOML parsing, and date arithmetic; all five have been checked with the additional compilers. Package compatibility still varies: for example, GNU 17 encounters an internal compiler error in a dependency of the TOML package’s upstream tests, although the example using that package works.

GitHub dependencies are supported, but registry dependencies and metapackages are not yet supported. Builds and execution remain subject to sandbox limits, so not every package will work. FPM jobs use a separate service from the ordinary source-code playground.

**FPM from Python.** The hosted runner now accepts package URLs, with optional application/test selection, standard input, and a main program of your own. For example:

```plaintext
python xplayground_run.py --fpm https://github.com/jacobwilliams/PCHIP --action test --compiler ifx
python xplayground_run.py --fpm https://github.com/jacobwilliams/PCHIP --main main.f90 --compilers gfortran ifx flang --diff numeric

```

Selected compilers run successively, with logs, a timing summary, and optional output comparisons. Each submission remains subject to the hosted service’s quotas.

**Local compilers and packages.** The repository also includes a command-line runner and browser interface for compilers installed on your own computer:

```plaintext
python xfortran_run.py module.f90 main.f90 --compilers gfortran ifx flang
python xfortran_serve.py --workspace .

```

These now support local FPM projects too. Install FPM and the desired compilers, clone a package, and run these commands from its directory:

```plaintext
python xfortran_run.py --fpm . --action test --compilers gfortran ifx flang
python xfortran_run.py --fpm . --main main.f90 --compilers gfortran ifx --diff numeric
python xfortran_serve.py --workspace . --fpm

```

The [README](https://github.com/Beliavsky/fortran-playground#readme) explains the interfaces, options, and limitations. Reports of compiler discrepancies, useful small examples, and packages worth testing are welcome.
