{"id":20476683,"url":"https://github.com/rabbitmq/rules_erlang","last_synced_at":"2025-08-20T04:31:29.202Z","repository":{"id":36951978,"uuid":"319347837","full_name":"rabbitmq/rules_erlang","owner":"rabbitmq","description":"Bazel rules for building Erlang applications and libraries","archived":false,"fork":false,"pushed_at":"2024-09-19T21:33:18.000Z","size":1405,"stargazers_count":36,"open_issues_count":1,"forks_count":11,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-12-10T10:37:03.684Z","etag":null,"topics":["bazel","bazel-rules","erlang"],"latest_commit_sha":null,"homepage":"","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rabbitmq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2020-12-07T14:37:53.000Z","updated_at":"2024-11-27T22:48:31.000Z","dependencies_parsed_at":"2023-11-20T10:32:45.134Z","dependency_job_id":"cdda530b-185f-4d0e-b1d6-22354277d4e1","html_url":"https://github.com/rabbitmq/rules_erlang","commit_stats":{"total_commits":627,"total_committers":11,"mean_commits":57.0,"dds":"0.14673046251993616","last_synced_commit":"643cd5bdb0095689bd710403e8e5fd00dfda4d7b"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frules_erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frules_erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frules_erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frules_erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabbitmq","download_url":"https://codeload.github.com/rabbitmq/rules_erlang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394228,"owners_count":18218707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-rules","erlang"],"created_at":"2024-11-15T15:22:21.400Z","updated_at":"2024-12-19T07:05:42.094Z","avatar_url":"https://github.com/rabbitmq.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rules_erlang\n\nBazel rules for Erlang sources\n\n## Examples\n\nSee [basic](examples/basic/)\n\n## Typical rules\n\n### Compile and run all tests\n\n```shell\nbazel test //...\n```\n\n### Run the unit suite only\n\n```shell\nbazel test //:unit_SUITE\n```\n\n### Run a single test case\n\n```shell\nbazel test //:unit_SUITE \\\n    --test_env FOCUS=\"-group my_group -case my_case\"\n```\n\n## Assumptions\n\n`erlang_app` and `ct_suite` macros require the standard otp layout, relative to the bazel package (to some degree abitrary layout can be handled with with the `erlang_bytecode`, `app_file`, `erlang_app_info` \u0026 `ct_test` rules which those macros utilize). For an erlang application named `my_erlang_app` this means:\n\n```\nmy_erlang_app\n├── BUILD.bazel\n├── include\n│   ├── ...\n│   └── my_header.hrl\n├── priv\n│   └── schema\n├── src\n│   ├── ...\n│   └── my_erlang_app.erl\n└── test\n    ├── ...\n    └── unit_SUITE.erl\n```\n\nAnd that the convention is followed where, using the `dest` attribute of the `erlang_bytecode` rule:\n1. Compiled production bytecode is placed in `ebin`\n2. Compiled test bytecode is placed in `src`\n3. Compiled test suite and test helper bytecode is placed in `test`\n\nThe example above follows these conventions.\n\n## Additional examples\n\n- https://github.com/rabbitmq/lz4-erlang uses rules_erlang with bzlmod and compiles native extensions\n- https://github.com/rabbitmq/rabbitmq-server provides a complex example of usage\n\n## Copyright and License\n\n(c) 2020-2023 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.  All rights reserved.\n\nDual licensed under the Apache License Version 2.0 and\nMozilla Public License Version 2.0.\n\nThis means that the user can consider the library to be licensed under\n**any of the licenses from the list** above. For example, you may\nchoose the Apache Public License 2.0 and include this library into a\ncommercial product.\n\nSee [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Frules_erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabbitmq%2Frules_erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Frules_erlang/lists"}