{"id":33317279,"url":"https://github.com/miinso/rules_fortran","last_synced_at":"2026-06-19T14:31:21.770Z","repository":{"id":321440047,"uuid":"1078360732","full_name":"miinso/rules_fortran","owner":"miinso","description":"Fortran rules for Bazel","archived":false,"fork":false,"pushed_at":"2026-03-04T15:11:50.000Z","size":165,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T19:58:36.084Z","etag":null,"topics":["bazel","blas","brrr","eigen","flang","fortran","lapack","openblas","rules","rules-fortran","sparse","wasm"],"latest_commit_sha":null,"homepage":"https://miinso.github.io/rules_fortran","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miinso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-17T15:55:41.000Z","updated_at":"2026-03-04T15:18:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e71be3aa-6be1-4210-a57f-d18560347635","html_url":"https://github.com/miinso/rules_fortran","commit_stats":null,"previous_names":["miinso/fortran-go-brrr","miinso/rules_fortran"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miinso/rules_fortran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miinso%2Frules_fortran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miinso%2Frules_fortran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miinso%2Frules_fortran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miinso%2Frules_fortran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miinso","download_url":"https://codeload.github.com/miinso/rules_fortran/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miinso%2Frules_fortran/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34536274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","blas","brrr","eigen","flang","fortran","lapack","openblas","rules","rules-fortran","sparse","wasm"],"created_at":"2025-11-19T17:00:34.121Z","updated_at":"2026-06-19T14:31:21.736Z","avatar_url":"https://github.com/miinso.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rules_fortran\n\nFortran rules for Bazel using LLVM Flang.\n\nBuilds libraries, binaries, and tests. Cross-compiles to WebAssembly.\nWorks with C/Fortran interop, from-source BLAS/LAPACK, and OpenMP.\n\n[Documentation](https://miinso.github.io/rules_fortran/) -- [Examples](https://github.com/miinso/rules_fortran/tree/master/examples)\n\n## Platforms\n\n| Host | Native target | Cross-compilation |\n|------|---------------|-------------------|\n| Linux x86_64 | x86_64-unknown-linux-gnu | wasm32-unknown-emscripten |\n| Linux ARM64 | aarch64-unknown-linux-gnu | wasm32-unknown-emscripten |\n| macOS x86_64 | x86_64-apple-darwin | wasm32-unknown-emscripten |\n| macOS ARM64 | arm64-apple-darwin | wasm32-unknown-emscripten |\n| Windows x86_64 | x86_64-pc-windows-msvc | wasm32-unknown-emscripten |\n\n## Setup\n\nAdd to your `MODULE.bazel`:\n\n```starlark\nbazel_dep(name = \"rules_fortran\")\ngit_override(\n    module_name = \"rules_fortran\",\n    remote = \"https://github.com/miinso/rules_fortran.git\",\n    commit = \"...\",  # see releases\n)\n```\n\n## Usage\n\n```starlark\nload(\"@rules_fortran//fortran:defs.bzl\", \"fortran_binary\", \"fortran_library\", \"fortran_test\")\n\nfortran_library(\n    name = \"mylib\",\n    srcs = [\"mylib.f90\"],\n)\n\nfortran_binary(\n    name = \"myapp\",\n    srcs = [\"main.f90\"],\n    deps = [\":mylib\"],\n)\n\nfortran_test(\n    name = \"mytest\",\n    srcs = [\"test.f90\"],\n    deps = [\":mylib\"],\n)\n```\n\n### C interop\n\nFortran and C targets can depend on each other directly:\n\n```starlark\nfortran_library(name = \"fortran_math\", srcs = [\"math.f90\"])\ncc_binary(name = \"app\", srcs = [\"main.c\"], deps = [\":fortran_math\"])\n```\n\n### OpenMP\n\n```starlark\nfortran_test(\n    name = \"hello_omp\",\n    srcs = [\"hello_omp.f90\"],\n    copts = [\"-fopenmp\"],\n    deps = [\"@libomp\"],\n)\n```\n\n### WebAssembly\n\nCross-compile to wasm32 with Emscripten:\n\n```starlark\nfortran_library(name = \"hello\", srcs = [\"hello.f90\"])\ncc_binary(name = \"hello_cc\", deps = [\":hello\"])\nwasm_cc_binary(name = \"hello_wasm\", cc_target = \":hello_cc\")\n```\n\nSee [examples/](https://github.com/miinso/rules_fortran/tree/master/examples) for BLAS/LAPACK, OpenMP+wasm, and more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiinso%2Frules_fortran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiinso%2Frules_fortran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiinso%2Frules_fortran/lists"}