# rebar3 的使用

# 安装

$ git clone https://github.com/erlang/rebar3.git
$ cd rebar3
$ ./bootstrap
1
2
3
$ ./rebar3 local install
===> Extracting rebar3 libs to ~/.cache/rebar3/lib...
===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3...
===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin
1
2
3
4

# 使用

# 创建

$ rebar3 new
app (custom): Complete OTP Application structure. 
cmake (custom): Standalone Makefile for building C/C++ in c_src
escript (custom): Complete escriptized application structure
lib (custom): Complete OTP Library application (no processes) structure
plugin (custom): Rebar3 plugin project structure
release (custom): OTP Release structure for executable programs 
1
2
3
4
5
6
7

# 编译

rebar3 compile
1

# 发布

rebar3 release
1

# 参考

https://github.com/erlang/rebar3 (opens new window)

Last Updated: 3/18/2021, 1:20:30 PM