How elixir-lang/elixir works
Elixir is a language and runtime ecosystem for building scalable, maintainable applications. The repository includes the language/runtime, template engine, interactive shell, test framework, logging system, and Mix project tooling. A typical developer workflow uses Mix to compile and start an application, then runs it or interacts with it through IEx; ExUnit and Logger provide testing and diagnostics. The tree and excerpts identify these major areas, but many implementation links are not shown, so uncertain relationships are omitted.
Main entry points: server.ex Shell server · app.start.ex App start task · app.ex Logger startup · handler.ex Log handler
Components 29
Language and runtime
- Application lifecycle
lib/elixir/lib/application.ex - Code fragments
lib/elixir/lib/code/fragment.ex - Unicode tokenizer
lib/elixir/unicode/tokenizer.ex - Type descriptions
lib/elixir/lib/module/types/descr.ex - Inspect formatting
lib/elixir/lib/inspect/algebra.ex - Option parsing
lib/elixir/lib/option_parser.ex - Supervised tasks
lib/elixir/lib/task/supervised.ex
Template engine
- EEx templates
lib/eex/lib/eex.ex - Template compiler
lib/eex/lib/eex/compiler.ex - Template engine
lib/eex/lib/eex/engine.ex - Smart engine
lib/eex/lib/eex/smart_engine.ex
Interactive shell
- IEx interface
lib/iex/lib/iex.ex - Shell server
lib/iex/lib/iex/server.ex - Shell evaluator
lib/iex/lib/iex/evaluator.ex - Autocomplete
lib/iex/lib/iex/autocomplete.ex - Introspection
lib/iex/lib/iex/introspection.ex
Testing and logging
- ExUnit framework
lib/ex_unit/lib/ex_unit.ex - Test coordination
lib/ex_unit/lib/ex_unit/server.ex - Test events
lib/ex_unit/lib/ex_unit/event_manager.ex - Logger API
lib/logger/lib/logger.ex - Logger startup
lib/logger/lib/logger/app.ex - Log handler
lib/logger/lib/logger/backends/handler.ex - Log formatter
lib/logger/lib/logger/formatter.ex - Log translator
lib/logger/lib/logger/translator.ex
Project tooling
- Mix CLI
lib/mix/lib/mix.ex - Elixir compiler
lib/mix/lib/mix/compilers/elixir.ex - App start task
lib/mix/lib/mix/tasks/app.start.ex - App tree task
lib/mix/lib/mix/tasks/app.tree.ex
Other components
- Developer
Connections 13
- Developer → Mix CLI: invokes
- App start task → Application lifecycle: starts apps
lib/mix/lib/mix/tasks/app.start.ex - App start task → Option parsing: parses options
lib/mix/lib/mix/tasks/app.start.ex - App start task → Mix CLI: runs config task
lib/mix/lib/mix/tasks/app.start.ex - App tree task → Option parsing: parses options
lib/mix/lib/mix/tasks/app.tree.ex - Smart engine → Template engine: delegates callbacks
lib/eex/lib/eex/smart_engine.ex - Shell server → Shell evaluator: starts evaluator
lib/iex/lib/iex/server.ex - Shell server → Autocomplete: selects expansion
lib/iex/lib/iex/server.ex - Shell server → IEx interface: registers broker
lib/iex/lib/iex/server.ex - Logger startup → Log handler: configures handlers
lib/logger/lib/logger/app.ex - Logger startup → Log translator: registers filter
lib/logger/lib/logger/app.ex - Log handler → Log formatter: formats events
lib/logger/lib/logger/backends/handler.ex - Test events → Test coordination: dispatches handlers
lib/ex_unit/lib/ex_unit/event_manager.ex