简体   繁体   中英

Install third party libs, package management, application folder structure in Erlang

I've been studying Erlang for a while, and want to write a small sample Erlang application, but I do not know how to do it, I mean more Erlanglish way.

How to install third party libs? Something like npm install for node.js

What is the recommended folder structure?

Is there some sample yet classical Erlang application demonstrate it, that I can learn from?

推荐的目录结构在此处记录

The recommended way of installing an Erlang application is to avoid using a 3rd party packaging system as of now. We don't have a package manager (note the date of this post, it might change in the future). Rather, we rely on a tool like rebar to package what we call a release .

A release is a packaging of needed libraries, with correct versions into a standalone version of the Erlang system in a separate directory structure. This structure can be zipped and moved to another machine and run by itself.

There are 3 ways to do this: use reltool directly use rebar to call reltool, or use the newly created relx tool to make release assemblies.

The problem with an npm like tool is when you need to have different versions of packages that cannot coexist and you need dependency convergence. Currently the "solution" is not to solve it in Erlang.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM