Build for production
On this page
Build a native executable with production optimizations, then launch the reported path directly. The runtime is included; the target machine does not need Node.js or your source tree.
Check the build host
maligator doctor --verbose
maligator build --productionProduction builds compile C locally. Matching archives from the platform package let the build skip Rust compilation. When the default C toolchain cannot build the runtime, Maligator tries an existing Zig installation or downloads a pinned release. See Set up native builds.
Development builds keep native symbols and skip link-time optimization for useful crash diagnostics. --production adds link-time optimization when the toolchain supports it and strips native symbols after linking. When either step is unavailable, the build prints a warning and still produces a valid executable. Stripping keeps Maligator's JavaScript source positions.
The output name comes from outputName, the unscoped package name, or the project directory. Production binaries are placed under the project build cache; use the path the command prints rather than guessing its cache identity.
Create a deployable artifact
maligator build --production --artifact dist/my-appThe destination must be absent or empty. The result contains:
my-app/
artifact.json
LICENSE
SHA256SUMS
THIRD_PARTY_NOTICES.md
bin/
<application>artifact.json records version, target, production status, size, and SHA-256 identity. Copy or archive the complete directory. If profiling was requested, profile.jsonl is also included.
Configuration environment reads happen at build time. Runtime arguments and environment values belong to the launched application; they do not change the captured execution context.
Build for another target
maligator doctor --target x86_64-unknown-linux-gnu --verbose
maligator build --production --target x86_64-unknown-linux-gnuCross-builds use Zig. Follow the cross-build setup for the target's runtime archives or Rust standard library, then test the artifact on its intended host.
Bound worker-image compilation
Production builds overlap the owning compiler with up to two worker-image compilers, bounded by the host CPU budget. --compile-concurrency 1 selects serial compilation; values 2 or 3 lower the total job limit. Applications without worker roots and cache hits start no helpers. This flag requires --production; profiling stays serial.
Retain source, config, Maligator version, and toolchain identity with your release. Output caching avoids repeated work but does not establish byte-for-byte reproducibility across toolchains. Use profiling for performance evidence and CLI build options for exact flags.