Roc has different rust crates for various binaries and libraries. These are described below to help give you an overview. If you see something here that is out of date, please correct it or discuss it in the [Zulip chat](https://roc.zulipchat.com/).
Compiles `.roc` files and combines them with their platform into an executable binary. See [compiler/README.md](./compiler/README.md) for more information.
-`roc_alias_analysis` Performs analysis and optimizations to remove unneeded reference counts at runtime, and supports in-place mutation.
-`arena-pool` An implementation of an arena allocator designed for the compiler's workloads.
-`roc_build` Responsible for coordinating building and linking of a Roc app with its host.
-`roc_builtins` provides the Roc functions and modules that are implicitly imported into every module. See [README.md](./compiler/builtins/README.md) for more information.
-`roc_can` Canonicalize a roc abstract syntax tree, resolving symbols, re-ordering definitions, and preparing a module for type inference.
-`roc_collections` Domain-specific collections created for the needs of the compiler.
-`roc_constrain` Responsible for building the set of constraints that are used during type inference of a program, and for gathering context needed for pleasant error messages when a type error occurs.
-`roc_debug_flags` Environment variables that can be toggled to aid debugging of the compiler itself.
-`roc_derive` provides auto-derivers for builtin abilities like `Hash` and `Decode`.
-`roc_gen_dev` provides the compiler backend to generate Roc binaries fast, for a nice developer experience. See [README.md](./compiler/gen_dev/README.md) for more information.
-`roc_gen_llvm` provides the LLVM backend to generate Roc binaries. Used to generate a binary with the fastest possible execution speed.
-`roc_load` Used to load a .roc file and coordinate the compiler pipeline, including parsing, type checking, and code generation.
-`roc_load_internal` The internal implementation of roc_load, separate from roc_load to support caching.
-`roc_module` Implements data structures used for efficiently representing unique modules and identifiers in Roc programs.
-`roc_mono` Roc's main intermediate representation (IR), which is responsible for monomorphization, defunctionalization, inserting ref-count instructions, and transforming a Roc program into a form that is easy to consume by a backend.
-`roc_parse` Implements the Roc parser, which transforms a textual representation of a Roc program to an abstract syntax tree.
The `roc_glue` crate generates rust code to connect a Roc app with a rust platform. This tool is not necessary for writing a platform in another language, however, it's an added convenience for rust platform devs.
Surgical linker that links platforms to Roc applications.
We created our own linker for speed and because regular linkers add a lot of problems and complexity. Because we want roc to manage the build system and final linking of the executable, it is significantly less practical to use a regular linker. This can be seen in how many arbitrary libraries we link with the legacy linker because we have no idea what libraries the application is actually using.
See [README.md](./linker/README.md) for more information.
These are files that were originally obtained somewhere else (e.g. crates.io) but which we needed to fork for some Roc-specific reason. See [README.md](./vendor/README.md) for more information.