Atom

Install the toolchain

Install a matching Atom release SDK or build from the versioned source tree. The SDK installs the available tools (atom, atomc and optionally atomls) under bin, the C headers under include, the libraries and CMake package under the configured library directory, and license notices under share/atom. Add the installation's bin directory to PATH or invoke a tool by its full path. Windows tools have an .exe suffix.

Build from the root of the Atom source tree with CMake 3.25 or newer and a C17 compiler. CMake fetches pinned dependency archives. The full dependency configuration also uses GNU Make, a POSIX shell and Perl.

Platform Toolchain
Linux x86-64/ARM64 GCC or Clang, CMake, a build generator, Make and Perl for bundled libraries. Enable MIR explicitly for JIT.
Windows x86-64/ARM64 Use MSYS2 CLANG64 or CLANGARM64, respectively. Use the matching Clang, CMake and Ninja with MSYS Make and Perl. Use a MinGW-compatible compiler for the full library set and native builds.
macOS x86-64/ARM64 Apple Command Line Tools or another supported Clang toolchain, CMake, Make and Perl. Build for the same architecture as the program and its native libraries.
Terminal
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DATOM_WITH_SQLITE=ON
cmake --build build --parallel
cmake --install build --prefix "$PWD/atom-sdk"

In MSYS2 add -G Ninja -DCMAKE_C_COMPILER=clang on the first configure. --config Release is needed at build and install time for multi-configuration generators. Treat platform availability and test coverage separately. The CI matrix targets both architectures on Linux, Windows and macOS. This reference's executable examples were exercised on Linux x86-64, subject to the dependencies called out in the examples.

CMake option Effect and default
ATOM_BUILD_CLI Build atom and atomc. On.
ATOM_BUILD_SHARED Build the shared embedding library in addition to the static library. On.
ATOM_BUILD_LSP Builds the atomls language server. Defaults to the CLI setting.
ATOM_WITH_JSON yyjson-backed json. On.
ATOM_WITH_REGEX PCRE2-backed text.match. On.
ATOM_WITH_RANDOM PCG-backed random. On.
ATOM_WITH_UV libuv-backed filesystem, paths, processes, clocks, sockets, workers and channels. On.
ATOM_WITH_FFI libffi-backed native calls and extensions. Defaults on for native Unix and MinGW builds.
ATOM_WITH_TLS OpenSSL-backed TLS, crypto, and Base64. Defaults on for native Unix and MinGW builds.
ATOM_WITH_HTTP libcurl/llhttp-backed HTTP. Defaults on when TLS and libuv are enabled and requires both.
ATOM_WITH_ARCHIVE miniz-backed archive. On.
ATOM_WITH_SQLITE sqlite. Off.
ATOM_WITH_JIT Linux x86-64 and ARM64 MIR backend. Off.

Cross builds use a target CMake toolchain file. Enable target FFI, TLS and HTTP explicitly when needed. ATOM_OPENSSL_DIR configures the target OpenSSL directory, with /etc/ssl on Unix and C:/ProgramData/Atom/ssl on Windows as defaults.