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
- Build Command:
tools/lapis/src/commands/build.cr - Sync Command:
tools/lapis/src/commands/sync.cr - Live Spec:
tools/lapis/spec/commands/build_spec.cr
Defined in:
libgodot/docs/b_lapis_cli_and_toolchain/d_build_and_sync.crClass Method Summary
-
.topic_00_build_targets : Nil
Supported Build Targets: Listing of compilable artifacts: game, plugin, standalone, and templates.
-
.topic_01_build_command : Nil
lapis build: Compilation Modes & Flags: Command syntax, compilation flags, release optimizations, and single-module options.
-
.topic_02_sync_command : Nil
lapis sync: Multi-Target Synchronization: Ensuring all consumer projects share identical binary deliverables and manifests.
Class Method Detail
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
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
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:
- Verifies
bin/crystal_bridge.dlland copies to consumerbin/directories. - Validates runtime dependencies (
gc.dll,pcre2-8.dll,iconv-2.dll,libgodot.dll). - Synchronizes GDExtension manifests (
crystal.gdextension). - Enforces
.gdignoreplacement insidelib/and output directories.