Skip to content

grAItools/preserf

Repository files navigation

preserf - Preprocessor for Fortran data serialization directives

preserf is a Python preprocessor that expands !$SER directives in Fortran source into explicit serialization calls.

The repository contains two main pieces:

  • src/preserf/: the preprocessor engine and CLI.
  • src/preserf-fortran/: Fortran helper modules that provide the runtime API targeted by generated code.

What it does

  • Parses !$SER directives using a two-pass analysis/generation model.
  • Injects the required USE imports and guarded serialization blocks.
  • Expands directives such as INIT, SAVEPOINT, DATA, REGISTER, and related forms into Fortran API calls.
  • Supports CLI processing of single files or directory trees.

Development commands

  • pixi run test-py: run the fast Python test suite.
  • pixi run test-all: run the Python suite, the native Fortran ctest suite, and every example.
  • pixi run lint: run static checks.
  • pixi run fmt: apply formatting.
  • pixi run verify: run the full verification gate (fmt-check + lint + typecheck + Python tests + Fortran build/ctest).

Key documentation

About

A preprocessor for Fortran data serialization directives

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors