{"id":50589727,"url":"https://github.com/martianoff/rules-gala","last_synced_at":"2026-06-05T09:30:36.029Z","repository":{"id":361077070,"uuid":"1252002562","full_name":"martianoff/rules-gala","owner":"martianoff","description":"Bazel rules, a bzlmod extension, and a gazelle plugin for building, testing, and transpiling the GALA language — plus a Bazel module registry that publishes rules_gala.","archived":false,"fork":false,"pushed_at":"2026-06-05T07:51:09.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T08:10:37.512Z","etag":null,"topics":["bazel","bazel-registry","bazel-rules","build-system","bzlmod","functional-programming","gala","gala-lang","gazelle","go","golang","programming-language","starlark","toolchain","transpiler"],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martianoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-05-28T05:21:51.000Z","updated_at":"2026-06-05T07:51:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/martianoff/rules-gala","commit_stats":null,"previous_names":["martianoff/rules-gala"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/martianoff/rules-gala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martianoff%2Frules-gala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martianoff%2Frules-gala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martianoff%2Frules-gala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martianoff%2Frules-gala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martianoff","download_url":"https://codeload.github.com/martianoff/rules-gala/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martianoff%2Frules-gala/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33939226,"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-05T02:00:06.157Z","response_time":120,"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","bazel-registry","bazel-rules","build-system","bzlmod","functional-programming","gala","gala-lang","gazelle","go","golang","programming-language","starlark","toolchain","transpiler"],"created_at":"2026-06-05T09:30:35.278Z","updated_at":"2026-06-05T09:30:36.019Z","avatar_url":"https://github.com/martianoff.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rules_gala\n\nBazel rules and a bzlmod extension for the [GALA](https://github.com/martianoff/gala_simple) language.\n\nThis module also functions as a Bazel module registry that publishes `rules_gala` itself.\n\n## Setup\n\nIn your `MODULE.bazel`:\n\n```starlark\nbazel_dep(name = \"rules_gala\", version = \"0.1.0\")\nbazel_dep(name = \"gala\", version = \"1.0.0\")\n\n# Register the toolchain shipped by the `gala` language module.\nregister_toolchains(\"@gala//tools/toolchain:gala_toolchain\")\n\n# Optional: resolve GALA module deps from gala.mod.\ngala = use_extension(\"@rules_gala//gala:extensions.bzl\", \"gala\")\ngala.from_file(gala_mod = \"//:gala.mod\")\n```\n\nIn your `.bazelrc`:\n\n```\ncommon --registry=https://raw.githubusercontent.com/martianoff/rules-gala/main/\ncommon --registry=https://bcr.bazel.build\n```\n\nThe custom registry must come first so it wins for `rules_gala`.\n\n## Rules\n\nLoad from `@rules_gala//gala:defs.bzl`:\n\n| Rule                       | Purpose                                                                  |\n|----------------------------|--------------------------------------------------------------------------|\n| `gala_library`             | Build a GALA library (`go_library` under the hood).                      |\n| `gala_binary`              | Build a GALA executable.                                                 |\n| `gala_test`                | Test rule that auto-discovers `Test*` functions in `.gala` files.        |\n| `gala_exec_test`           | Test rule that compares program stdout against a checked-in expected file. |\n| `gala_unit_test`           | Wrap a `gala_binary` as a test (exit-code-only).                         |\n| `gala_transpile`           | Transpile a single `.gala` file to `.go`.                                |\n| `gala_transpile_package`   | Batch-transpile all `.gala` files in a package in one process.           |\n| `gala_bootstrap_transpile` | Transpile with the bootstrap binary (stdlib use only).                   |\n\n## Example\n\n```starlark\nload(\"@rules_gala//gala:defs.bzl\", \"gala_library\", \"gala_test\")\n\ngala_library(\n    name = \"mylib\",\n    srcs = [\"mylib.gala\"],\n    importpath = \"example.com/mylib\",\n    visibility = [\"//visibility:public\"],\n)\n\ngala_test(\n    name = \"mylib_test\",\n    srcs = [\"mylib_test.gala\"],\n    deps = [\":mylib\"],\n)\n```\n\n## Toolchain\n\nThe rules resolve everything through `@rules_gala//gala:toolchain_type`. The `gala` language module ships an implementation backed by its in-repo transpiler binaries, stdlib filegroup, and test framework. To provide your own toolchain, instantiate `gala_toolchain` from `@rules_gala//gala:toolchain.bzl`:\n\n```starlark\nload(\"@rules_gala//gala:toolchain.bzl\", \"gala_toolchain\")\n\ngala_toolchain(\n    name = \"my_gala_toolchain_impl\",\n    gala_binary       = \"//path/to:gala\",\n    gala_worker       = \"//path/to:gala_worker\",\n    gala_bootstrap    = \"//path/to:gala_bootstrap\",\n    test_runner       = \"//path/to:gala_test_runner\",\n    test_gen          = \"//path/to:gala_test_gen\",\n    all_gala_sources  = \"//:all_gala_sources\",\n    go_mod            = \"//:go.mod\",\n)\n\ntoolchain(\n    name = \"my_gala_toolchain\",\n    toolchain = \":my_gala_toolchain_impl\",\n    toolchain_type = \"@rules_gala//gala:toolchain_type\",\n)\n```\n\n## License\n\nApache 2.0. See `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartianoff%2Frules-gala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartianoff%2Frules-gala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartianoff%2Frules-gala/lists"}