Mix (build tool)

Last updated
Mix
Original author(s) Anthony Grimes
Initial release2012;12 years ago (2012)
Stable release
1.11.4 / 16 March 2021;3 years ago (2021-03-16) [1]
Written in Elixir
Platform Erlang
Type Build tool
License Apache License 2.0 [2]
Website hexdocs.pm/mix/Mix.html

Mix is a build automation tool for working with applications written in the Elixir programming language. [3] [4] Mix was created in 2012 by Anthony Grimes, who took inspiration from Clojure's Leiningen. Soon after, Mix was merged into the Elixir programming language itself and to this day is one of the six applications that are part of the Elixir language. Mix provides functionality for creating, compiling, and testing Elixir source code and for managing dependencies and deploying Elixir applications. [5]

Contents

Mix tasks

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

$ mixnewhello_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.exsYour Mix project was created successfully.You can use "mix" to compile it, test it, and more:    cd hello_world    mix testRun "mix help" for more commands.

Mix projects

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.

Application

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). [6] Mix is used with web applications built on the Phoenix framework. [7]

See also

Related Research Articles

<span class="mw-page-title-main">Erlang (programming language)</span> Programming language

Erlang is a general-purpose, concurrent, functional high-level programming language, and a garbage-collected runtime system. The term Erlang is used interchangeably with Erlang/OTP, or Open Telecom Platform (OTP), which consists of the Erlang runtime system, several ready-to-use components (OTP) mainly written in Erlang, and a set of design principles for Erlang programs.

<span class="mw-page-title-main">SCons</span>

SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is analogous to the traditional GNU build system based on the make utility and the autoconf tools.

IronPython is an implementation of the Python programming language targeting the .NET and Mono frameworks. The project is currently maintained by a group of volunteers at GitHub. It is free and open-source software, and can be implemented with Python Tools for Visual Studio, which is a free and open-source extension for Microsoft's Visual Studio IDE.

<span class="mw-page-title-main">Vala (programming language)</span> Programming language

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

<span class="mw-page-title-main">QB64</span> IDE for the BASIC programming language

QB64 is a self-hosting BASIC compiler for Microsoft Windows, Linux and Mac OS X, designed to be compatible with Microsoft QBasic and QuickBASIC. QB64 is a transpiler to C++, which is integrated with a C++ compiler to provide compilation via C++ code and GCC optimization.

sbt (software) Open-source build tool for Scala and Java projects

sbt is an open-source build tool created explicitly for Scala and Java projects. It aims to streamline the procedure of constructing, compiling, testing, and packaging applications, libraries, and frameworks. sbt is highly adaptable, permitting developers to customize the build process according to their project's specific needs.

Dart is a programming language designed by Lars Bak and Kasper Lund and developed by Google. It can be used to develop web and mobile apps as well as server and desktop applications.

<span class="mw-page-title-main">Elm (programming language)</span> Functional programming language

Elm is a domain-specific programming language for declaratively creating web browser-based graphical user interfaces. Elm is purely functional, and is developed with emphasis on usability, performance, and robustness. It advertises "no runtime exceptions in practice", made possible by the Elm compiler's static type checking.

Elixir is a functional, concurrent, high-level general-purpose programming language that runs on the BEAM virtual machine, which is also used to implement the Erlang programming language. Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides tooling and an extensible design. The latter is supported by compile-time metaprogramming with macros and polymorphism via protocols.

<span class="mw-page-title-main">Julia (programming language)</span> Dynamic programming language

Julia is a high-level, general-purpose dynamic programming language, most commonly used for numerical analysis and computational science. Distinctive aspects of Julia's design include a type system with parametric polymorphism and the use of multiple dispatch as a core programming paradigm, efficient garbage collection, and a just-in-time (JIT) compiler.

<span class="mw-page-title-main">GraalVM</span> Virtual machine software

GraalVM is a Java Development Kit (JDK) written in Java. The open-source distribution of GraalVM is based on OpenJDK, and the enterprise distribution is based on Oracle JDK. As well as just-in-time (JIT) compilation, GraalVM can compile a Java application ahead of time. This allows for faster initialization, greater runtime performance, and decreased resource consumption, but the resulting executable can only run on the platform it was compiled for. It provides additional programming languages and execution modes. The first production-ready release, GraalVM 19.0, was distributed in May 2019. The most recent release is GraalVM for JDK 22, made available in March 2024.

CocoaPods is an application level dependency manager for Objective-C, Swift and any other languages that run on the Objective-C runtime, such as RubyMotion, that provides a standard format for managing external libraries. It was developed by Eloy Durán and Fabio Pelosin, who continue to manage the project with the help and contributions of many others. They began development in August 2011 and made the first public release on September 1, 2011. CocoaPods is strongly inspired by a combination of the Ruby projects RubyGems and Bundler.

<span class="mw-page-title-main">Nim (programming language)</span> Programming language

Nim is a general-purpose, multi-paradigm, statically typed, compiled high-level systems programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.

BEAM is the virtual machine at the core of the Erlang Open Telecom Platform (OTP). BEAM is part of the Erlang Run-Time System (ERTS), which compiles Erlang source code into bytecode, which is then executed on the BEAM. BEAM bytecode files have the .beam file extension.

Phoenix is a web development framework written in the functional programming language Elixir.

<span class="mw-page-title-main">PureScript</span> Strongly-typed language that compiles to JavaScript

PureScript is a strongly-typed, purely-functional programming language that transpiles to JavaScript, C++11, Erlang, and Go. It can be used to develop web applications, server side apps, and also desktop applications with use of Electron or via C++11 and Go compilers with suitable libraries. Its syntax is mostly comparable to that of Haskell. In addition, it introduces row polymorphism and extensible records. Also, contrary to Haskell, the PureScript language is defined as having a strict evaluation strategy, although there are non-conforming back ends which implement a lazy evaluation strategy.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

<span class="mw-page-title-main">Gleam (programming language)</span> Programming language

Gleam is a general-purpose, concurrent, functional high-level programming language that compiles to Erlang or JavaScript source code.

References

  1. "Releases - elixir-lang/elixir" . Retrieved 25 April 2020 via GitHub.
  2. "elixir/LICENSE at master · elixir-lang/elixir · GitHub". GitHub. 23 October 2022.
  3. "Technology Radar | Emerging Technology Trends for 2017 | ThoughtWorks". www.thoughtworks.com. Retrieved 2018-05-08.
  4. "Introduction to Mix". elixir-lang.github.com. Retrieved 2018-05-03.
  5. "Organising your Elixir project with Mix". Culttt. 2016-08-31. Retrieved 2018-05-03.
  6. "The Erlang Runtime System". happi.github.io. Retrieved 2018-05-03.
  7. "Mix Tasks · Phoenix". Phoenix. Retrieved 2018-05-03.