FORTRAN SOFTWARE CATALOG

Repository owner: Philipp (interkosmos)

fortran-lua54

Call Lua 5.4 functions and scripts from Fortran.

Repository · Pinned source (b3582591bc82) · Try in playground · Checked package example

GAMS classifications

About this package

Category
Language interfaces
License
ISC

Topics: c-interoperability, fortran, fortran-2008, fortran-package-manager, fpm, language-bindings, lua, lua54, scripting

Classification scope and review notes

Fortran bindings to Lua 5.4, linked with Debian Lua 5.4.7. The manifest library name lua-5.4 is adapted to Linux lua5.4; library sources are unchanged. Adapted from the upstream in-memory string example, the consumer defines a Lua function, passes an integer from Fortran, checks Lua load/call status and function type, verifies the returned integer and closes the state. External scripts, callbacks from Lua to Fortran, arbitrary Lua modules and all bindings are not validated.

Package dependencies

Resolved GitHub repositories used by the verified playground build, combining direct and indirect dependencies. This list does not describe internal module dependencies or native system libraries.

Required by this build

No additional GitHub package dependencies were recorded for this verified build.

Build record verified 2026-10-29.

Used by (0 selected packages)

No other selected build records this repository as a dependency. This is not a measure of usage outside the catalog.

Reviewed procedures

These mappings have pinned source evidence. A checked package example may exercise only some of them; source review is not a numerical benchmark.

lual_loadstring / lua_pcall / lua_tointeger

Module: lua

S

S: verified

Derivatives / callbacks: not applicable

Fortran bindings to Lua 5.4, linked with Debian Lua 5.4.7. The manifest library name lua-5.4 is adapted to Linux lua5.4; library sources are unchanged. Adapted from the upstream in-memory string example, the consumer defines a Lua function, passes an integer from Fortran, checks Lua load/call status and function type, verifies the returned integer and closes the state. External scripts, callbacks from Lua to Fortran, arbitrary Lua modules and all bindings are not validated. Dedicated S consumer checks exact factorial, sums-of-squares and signed-polynomial results plus real Pythagorean norms across the Fortran/Lua boundary. Checks return types, stack balance, expected runtime/syntax diagnostics and reuse of the same state after errors (128 integer and five real successes). Independent Lua scripts and Fortran references; no external script files. Arbitrary modules, callbacks to Fortran, userdata, concurrency and full language/binding coverage are not verified.

Pinned source: src/lua.f90

Author examples/tests: examples/string.f90

Load checked GAMS driver: gams-lua-numeric-embedding-reference