Mix (build tool)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Elixirlogo small.png
Developer(s)José Valim
Initial release2012; 7 years ago (2012)
Stable release
1.6.4 / 16 March 2018; 13 months ago (2018-03-16)[1]
Written inErlang
TypeBuild tool
LicenseMIT License

Mix is a build automation tool for working with applications written in the Elixir programming language.[2][3] Mix was created in 2012 by José Valim, member of the Ruby on Rails Core Team.[4][5] It provides functionality for creating, compiling, and testing Elixir source code and for managing dependencies and deploying Elixir applications.[6]

Mix developed from the Ruby ecosystem, and performs functions similar to Rake, RubyGems, and Bundler.[7]

Mix tasks[edit]

Mix provides tasks to create, clean, build, compile, run, and test Elixir applications. For example, Mix may be used to create a new Elixir project, such as a new hello_world application. Running mix new hello_world will result in

$ mix new hello_world
* creating README.md
* creating .formatter.exs
* creating .gitignore
* creating mix.exs
* creating config
* creating config/config.exs
* creating lib
* creating lib/hello_world.ex
* creating test
* creating test/test_helper.exs
* creating test/hello_world_test.exs

Your Mix project was created successfully.
You can use "mix" to compile it, test it, and more:

    cd hello_world
    mix test

Run "mix help" for more commands.

Mix projects[edit]

Mix uses the information defined in a Mix Project to compile, build, and assemble the application. By convention, this information is typically managed in an Elixir script file named mix.exs. The file may include version information, dependencies, and other configuration information.


As the Elixir build tool, Mix is used on applications that target the Erlang virtual machine (as opposed to the Java virtual machine or the .NET Common Language Runtime).[8] Mix is used with web applications built on the Phoenix framework.[9]

See also[edit]


  1. ^ "v1.6.4". Retrieved 2018-03-16.
  2. ^ "Technology Radar | Emerging Technology Trends for 2017 | ThoughtWorks". www.thoughtworks.com. Retrieved 2018-05-08.
  3. ^ "Introduction to Mix". elixir-lang.github.com. Retrieved 2018-05-03.
  4. ^ "José Valim on the Elixir Language, Concurrency, Iteration". InfoQ. Retrieved 2018-05-03.
  5. ^ "Elixir | Definition, Programming, History". Cleverism. Retrieved 2018-05-03.
  6. ^ "Organising your Elixir project with Mix". Culttt. 2016-08-31. Retrieved 2018-05-03.
  7. ^ Callan, Sean. "Elixir School". ElixirSchool. Retrieved 2018-05-03.
  8. ^ "The Erlang Runtime System". happi.github.io. Retrieved 2018-05-03.
  9. ^ "Mix Tasks · Phoenix". Phoenix. Retrieved 2018-05-03.

External links[edit]