Bazel rules for Fortran: build, test, and configure Fortran code with Bazel toolchains and rules.
- Add the module extension to your
MODULE.bazel:
bazel_dep(name = "rules_fortran", version = "<latest>")- Define a simple binary in
BUILD.bazel:
load("//fortran:defs.bzl", "fortran_binary")
fortran_binary(
name = "hello_world",
srcs = ["hello_world.f90"],
)For full setup details, rule reference, and more examples, see the docs: https://periareon.github.io/rules_fortran/