rebar3 的使用

最近从新拾起erlang做一个业余项目,之前一直用rebar来构建工程。在rebar的项目主页看到We encourage you to move to https://github.com/erlang/rebar3的字样. 于是就去用了一下rebar3。
rebar3 和rebar有太大改变了。简单记录一下使用功能:

安装

$ 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 newapp (custom): Complete OTP Application structure. cmake (custom): Standalone Makefile for building C/C++ in c_srcescript (custom): Complete escriptized application structurelib (custom): Complete OTP Library application (no processes) structureplugin (custom): Rebar3 plugin project structurerelease (custom): OTP Release structure for executable programs 

编译

rebar3 compile

发布

rebar3 release

总结

在我开发的时候用rebar3 release 编译调试特别麻烦。 我们只要用rebar3 compile 去编译然后运行 rebar3 shell 去调试程序。rebar3 构建的工程文件夹层次都太深了,开发起来很不方便,在linux我们可以用一下软连接。

关键字:erlang, rebar3, custom, structure


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部