Manuscript Documentation
v2026.12.0

Build levels#

--build-type sets native optimization and debugging information. ms build and ms bench default to an optimized Release executable emitted through LLVM. ms run and ms test default to Debug, which emits through Cranelift for fast edit/run builds. Pass --build-type Release to run or test optimized code.

Save this entrypoint as main.ms:

Manuscript
fn main() Void {
    print("ready")
}

Choose a level when building or running it:

sh
ms build main.ms --build-type Release -o program
ms build main.ms --build-type MinSizeRel -o small-program
ms run main.ms --build-type Debug

The two builds report Built program and Built small-program. The debug run prints ready.

Use Debug for unoptimized code and fast Cranelift builds, Release for optimized LLVM code and profiles, and MinSizeRel for the smallest executable.

On Linux, the default executable runs on glibc 2.28 or newer. Use --static with build, run, test, or bench to produce a self-contained musl executable for deployment without a glibc dependency.

Levels#

build, run, test, bench, and ms run --profile accept case-insensitive CMake-style names:

LevelBackendOptimizationSymbol table
DebugCraneliftDisabled, including inliningKept
ReleaseLLVMSpeedKept, so profilers and backtraces show names
MinSizeRelLLVMSpeed and sizeStripped

Every level links with --gc-sections (-dead_strip on macOS), which drops runtime and standard-library code the program never reaches. Executable size depends on the target, build level, and reachable library code. Build levels never change language semantics.

Defaults and command behavior#

  • The default is Release for build, bench, and ms run --profile, and Debug for run and test.
  • Repeated build types, unknown levels, and build-type flags on source-only commands are rejected before compilation.
  • Flags after -- go to the program.
  • Debug builds emit DWARF line tables, type descriptions, parameters, locals, and inlined frames; Release builds keep line tables and type descriptions, though optimization can reorder or remove operations. See profiling and native debugging .