# Elixir

> ElixirBuild builds Mix projects with the Erlang and Elixir your group pins, and releases a program with its own Erlang.

**ElixirBuild builds your Elixir with the Erlang and Elixir your group pins, tests it with ExUnit, and releases a program with its own Erlang.**

Build system: `ElixirBuild`
Start one: `plinto create elixir-service HelloEx` (or `elixir-lib`)
Ships as: a Mix release in an archive

## The project {#project}

Name the project as Elixir names a module: `HelloEx`, not `hello-ex`. Code is in `src/` and tests in `tst/`, with a `tst/test_helper.exs`. plinto writes `mix.exs` for the build.

```conf file=plinto.conf
{
  name = HelloEx
  version = 1.0
  build = ElixirBuild

  build-dependencies: {
    ElixirBuild = 1.0
    Erlang = 29
    Elixir = 1.20
  }
}
```

## A program {#program}

A project that names its application's module, `main = HelloEx.Application`, defined in `src/application.ex`, is a program: `plinto run` runs it with `mix run --no-halt`, with the arguments `args = [--port, 8080]` names first, and a release makes a release of it.

## Settings {#settings}

In `configuration/ElixirBuild.config`:

| Key | What it does |
|---|---|
| `warnings-as-errors` | fail on a compiler warning (default `true`) |
| `application` | a library's own application module, which starts with the program using it |
| `extra-applications` | applications to start too (default `[logger]`) |
| `release` | `false` for a library that has `src/application.ex` |
| `run.erl-options` | what `plinto run` passes to Erlang |

## Libraries {#libraries}

```sh
$ plinto import hex jason==1.4.4
```

A group holds one version of each Hex package. Elixir projects don't build on Windows yet.

- [Packages](../concepts/packages.md#imports): imports, for every language
- [Version groups](../concepts/version-groups.md): where Erlang 29 comes from
- [Your own scripts](custom.md): for a language plinto has no build system for
