XUtils

rebar3

A build tool for Erlang which can manage Erlang packages from [Hex.pm](https://hex.pm/). See more at [rebar3.org](https://www.rebar3.org/)


What is Rebar3

Rebar3 is an Erlang tool that makes it easy to create, develop, and release Erlang libraries, applications, and systems in a repeatable manner.

Rebar3 will:

  • respect and enforce standard Erlang/OTP conventions for project structure so they are easily reusable by the community;
  • manage source dependencies and Erlang packages while ensuring repeatable builds;
  • handle build artifacts, paths, and libraries such that standard development tools can be used without a headache;
  • adapt to projects of all sizes on almost any platform;
  • treat documentation as a feature, and errors or lack of documentation as a bug.

Rebar3 is also a self-contained Erlang script. It is easy to distribute or embed directly in a project. Tasks or behaviours can be modified or expanded with a plugin system flexible enough that even other languages on the Erlang VM will use it as a build tool.

Why Rebar3

Rebar3 is the spiritual successor to rebar 2.x, which was the first usable build tool for Erlang that ended up seeing widespread community adoption. It however had several shortcomings that made it difficult to use with larger projects or with teams with users new to Erlang.

Rebar3 was our attempt at improving over the legacy of Rebar 2.x, providing the features we felt it was missing, and to provide a better environment in which newcomers joining our teams could develop.

Should I use Rebar3?

If your main language for your system is Erlang, that you value repeatable builds and want your various tools to integrate together, we do believe Rebar3 is the best experience you can get.

Documentation

Rebar3 documentation is maintained on https://rebar3.org/docs

Migrating From rebar2

The grievances we had with Rebar 2.x were not fixable without breaking compatibility in some very important ways.

A full guide titled From Rebar 2.x to Rebar3 is provided on the documentation website.

Notable modifications include mandating a more standard set of directory structures, changing the handling of dependencies, moving some compilers (such as C, Diameter, ErlyDTL, or ProtoBuffs) to plugins rather than maintaining them in core rebar, and moving release builds from reltool to relx.


Articles

  • coming soon...