module Lapis::Docs::B_LAPIS_CLI_AND_TOOLCHAIN::D_BUILD_AND_SYNC

Overview

Build & Synchronization Commands

Comprehensive reference for lapis build and lapis sync, covering compilation modes, flags, optimizations, and multi-consumer binary orchestration.

Executive Summary & Key Topics

Topic Method / Anchor Description
Supported Build Targets .topic_00_build_targets Listing of compilable artifacts: game, plugin, standalone, and templates.
lapis build: Compilation Modes & Flags .topic_01_build_command Command syntax, compilation flags, release optimizations, and single-module options.
lapis sync: Multi-Target Synchronization .topic_02_sync_command Ensuring all consumer projects share identical binary deliverables and manifests.

Related Guides & Source References

Defined in:

libgodot/docs/b_lapis_cli_and_toolchain/d_build_and_sync.cr

Class Method Summary

Class Method Detail

def self.topic_00_build_targets : Nil #

Supported Build Targets: Listing of compilable artifacts: game, plugin, standalone, and templates.

Key Topics & Information

  • game: Primary game shared library (bin/game.dll/so/dylib)
  • plugin: Editor integration plugin (bin/plugin.dll/so/dylib)
  • standalone: Self-contained LibGodot host executable (bin/game.exe)
  • examples: All showcase projects under examples/
  • template: Starter template project

def self.topic_01_build_command : Nil #

lapis build: Compilation Modes & Flags: Command syntax, compilation flags, release optimizations, and single-module options.

Usage:

lapis build [target] [options]

Common Options:

Option Shorthand Description
--release -r Compiles with --release -O3 optimizations and strips debug symbols
--single-module -m Compiles via a single LLVM module for maximum cross-module optimization
--clean -c Removes previous build artifacts before compiling
--threads=N Sets the number of parallel Crystal compilation threads
--error-trace Prints full exception backtraces on compilation errors

Examples:

lapis build game                # Fast incremental debug build of game.dll
lapis build game -r             # Production release build
lapis build standalone -r -m    # Optimized single-module standalone executable

def self.topic_02_sync_command : Nil #

lapis sync: Multi-Target Synchronization: Ensuring all consumer projects share identical binary deliverables and manifests.

In a monorepo or multi-project workspace, different projects (e.g. examples/basic_demo, template/, performance/) require runtime shared libraries and manifests:

lapis sync [options]

What lapis sync Performs:

  1. Verifies bin/crystal_bridge.dll and copies to consumer bin/ directories.
  2. Validates runtime dependencies (gc.dll, pcre2-8.dll, iconv-2.dll, libgodot.dll).
  3. Synchronizes GDExtension manifests (crystal.gdextension).
  4. Enforces .gdignore placement inside lib/ and output directories.