最近重新拾起erlang作一个业余项目,以前一直用rebar来构建工程。在rebar的项目主页看到We encourage you to move to https://github.com/erlang/rebar3的字样. 因而就去用了一下rebar3。
rebar3 和rebar有太大改变了。简单记录一下使用功能:linux
$ git clone https://github.com/erlang/rebar3.git $ cd rebar3 $ ./bootstrap
$ ./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
$ 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
rebar3 compile
rebar3 release
在我开发的时候用rebar3 release 编译调试特别麻烦。 咱们只要用rebar3 compile 去编译而后运行 rebar3 shell 去调试程序。rebar3 构建的工程文件夹层次都太深了,开发起来很不方便,在linux咱们能够用一下软链接。git