9 Development & Deployment

9.3 Creating a Library

We've seen the directory structure above for a library project. We're defining a "library" project as one that doesn't start up any services as part of its basic operations. Instead, it provides code that other projects make use of.

In particular, in a library project, you do not need to define mod in your ebin/libname.app file. Similarly, in your src directory, you do not need to create application nor supervisor files.

We're making a rather arbitrary distinction here (between "library" projects and "service" projects, and one with undoubtedly many blurry lines. Regardless, it may be instructive or useful as a guideline.

This section will make use of the following example project on github: * https://github.com/lfe/lfe-library-example