rules_erlang 3.16.0Latest published 2.1y ago
MODULE.bazel
bazel_dep(name = "rules_erlang", version = "3.16.0")
README

rules_erlang

Bazel rules for Erlang sources.

Maintenance Status

Team RabbitMQ were using Bazel heavily alongside erlang.mk for a few years for its parallel builds and caching features.

However, erlang.mk has caught up and Bazel fell out of use.

Therefore, this project is not actively maintained. It has been forked, and an actively maintained version is located at marvin-hansen/rules_elixir.

Examples

See basic

Typical rules

Compile and run all tests

bazel test //...

Run the unit suite only

bazel test //:unit_SUITE

Run a single test case

bazel test //:unit_SUITE \
    --test_env FOCUS="-group my_group -case my_case"

Assumptions

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 & ct_test rules which those macros utilize). For an erlang application named my_erlang_app this means:

my_erlang_app
├── BUILD.bazel
├── include
│   ├── ...
│   └── my_header.hrl
├── priv
│   └── schema
├── src
│   ├── ...
│   └── my_erlang_app.erl
└── test
    ├── ...
    └── unit_SUITE.erl

And that the convention is followed where, using the dest attribute of the erlang_bytecode rule:

  1. Compiled production bytecode is placed in ebin
  2. Compiled test bytecode is placed in src
  3. Compiled test suite and test helper bytecode is placed in test

The example above follows these conventions.

Additional examples

Copyright and License

(c) 2020-2023 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.

Dual licensed under the Apache License Version 2.0 and Mozilla Public License Version 2.0.

This means that the user can consider the library to be licensed under any of the licenses from the list above. For example, you may choose the Apache Public License 2.0 and include this library into a commercial product.

See LICENSE for details.

About

Bazel rules for building Erlang applications and libraries

@rabbitmq/rules_erlang@rabbitmq
Homepage
37stars
Monday, September 16, 2024
@HoloRin#2790 Add rules_erlang@3.16.0 (#2790)

Languages

Erlang33.4%
Smarty1%
Makefile0.4%
Shell0%

Maintainers

@HoloRin

Versions

3.16.0 +2d19% 42024-09-16
3.15.4 +1d2024-09-13
3.15.3 +17h2024-09-12
3.15.2 +23h2024-09-11
3.15.1 +20h2024-09-10
3.15.0 +10.4mo2024-09-09
3.14.0 +5d2023-11-02
3.13.2 +10d2023-10-27
3.13.1 +17h2023-10-17
3.13.0 +1.1mo2023-10-16
3.12.0 +29d2023-09-13
3.11.4 +27d52% 112023-08-14
3.11.3 +8d2023-07-18
3.11.2 +5d2023-07-10
3.11.1 +7d10% 22023-07-04
3.11.0 +18d2023-06-27
3.10.7 +8d2023-06-08
3.10.6 +7d2023-05-31
3.10.5 +16h14% 32023-05-24
3.10.4 +4d2023-05-23
3.10.3 +2d2023-05-19
3.10.2 +1d5% 12023-05-17
3.10.1 +4d2023-05-16
3.10.0 +16d2023-05-11
3.9.14 +5d2023-04-25
3.9.13 +6d2023-04-20
3.9.12 +26d2023-04-14
3.9.11 +8d2023-03-18
3.9.10 +9d2023-03-10
3.9.9 +1d2023-02-28
3.9.8 +4d2023-02-27
3.9.7 +5d2023-02-22
3.9.6 +2d2023-02-16
3.9.5 +6d2023-02-14
3.9.4 +5d2023-02-07
3.9.3 +1d2023-02-02
3.9.2 +6d2023-01-31
3.9.1 +7d2023-01-24
3.9.0 +29d2023-01-17
3.8.5 +16d2022-12-19
3.8.4 +1.5mo2022-12-02
3.8.3 +1d2022-10-18
3.8.2 +4d2022-10-17
3.8.1 +2d2022-10-13
3.8.0 +7d2022-10-11
3.7.2 +4d2022-10-03
3.7.1 +1d2022-09-29
3.7.0 +8d2022-09-27
3.6.3 +5d2022-09-19
3.6.2 +3d2022-09-13
3.6.1 +25d2022-09-09
3.5.0 +2.1mo2022-08-15
3.1.0 +1.6mo2022-06-13
2.5.2 +22d2022-04-26
2.4.02022-04-04