Question

Is it possible to use rebar to create a simple project module skeleton that is not based on an OTP application ? Overall I want to use that project structure to become a library for other rebar generated applications.

The structure should be as follows:

/myprojectlib 
     /src
     /ebin
     /deps

The idea is to use it on the deps section of a rebar.config file:

{ deps, [myprojectlib] }.

At the moment, because myprojectlib is not a rebar project (and an OTP app) the rebar compilation fails with the message that it cannot identify myprojectlib, even if it is in the /deps directory of the target folder. I checked further and it appears that the deps of the rebar.config file only accepts other rebar projects, hence my need to create a simple rebar project which is not an OTP application.

Was it helpful?

Solution

Erlang libraries are apps. They are however called library apps.

You can create a sample library app with rebar create-lib libid=myprojectlib.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top