Help - Guidelines/how to release an erlang lib?

So I’ve finished writing a super fast, super sturdy, super very nice great success pooler in erlang. Now I want to open source it and make it available for others to use both in elixir and erlang.

How do I “package” this?

It’s a lib with 3 modules, a shared .hrl file with some types and constants, to use it you start the top level supervisor from your application, which starts and supervises one genserver and one genstatem defined by the other two modules, so I guess it’s a lib and not an application? Do I need rebar3? Or just a /src dir?

How should the documentation for it be done/included?

In Elixir I have module docs and docs etc for that, how is it in erlang? Is it just the readme file and RTF SourceCode?

This considering also for publishing in, in order to have those nice docs too.

Opinions I would also like to know:

  • should I also write an elixir lib wrapper specifically for it?
  • should I publish benchmarks of it comparing it to other similar libs and include it in the main repo? No? Or simply as a link to a gist/article?
  • What kinds of tests should I include besides the basic ones (meaning outside of, the supervisors still work, this really enqueues a request, this really checks in a request)?
  • How do I write tests in erlang??? :open_mouth:

Thanks for any insight or pointers to where I can find info for this


Elixir wrappers are usually not necessary in my opinion. They usually just add overhead for the runtime and the developer, as the wrapper needs to be documented and kept up to date as well and therefore duplicates the workload.

Benchmark and general comparing with other libraries are always a nice thing, and might show where the lib fits into the ecosystem and why and when I should use it over another pooler library.

And you write tests with eunit or common test, both are in the Erlang standard distribution. You can easily run them through rebar eunit or rebar ct (or rebar3 depending on your installation).

Publishing itself should be done via, it has a section in the documentation that explains how to use it with rebar3.


So there I go read how to use eunit and common test, thanks. On hex it tells how to use it to download rebar dependencies, but to upload it’s describing using a mix task? It needs to be inside a mix project then?

Sorry for beeing sparse on words, but I’m on low battery.


Thank you Norbert! No worries, I got a lot of reading to do already :slight_smile: