Skip to content

Build and Run Your Project

How-to Guide1 min read
Edit page

This guide shows how to drive the day-to-day build workflow with glyip: debug and release builds, backend selection, optimization levels, link-time optimization, and running the result.

Run this command in the directory that contains your Glyip.toml:

Terminal
glyip build

The build is incremental: glyip fingerprints sources and build configuration with SHA-256 and recompiles only what changed.

Terminal
glyip build --release

Combine --release with an explicit optimization level and LTO strategy when you want a tuned build:

Terminal
glyip build --release --opt-level 2 --lto thin

glyip build --backend accepts llvm (the default, producing native executables) or bytecode (Glyim’s own opcode format, used for testing and embedded execution — its output is not directly runnable):

Terminal
glyip build --backend bytecode

glyip run always builds with the LLVM backend, because running needs something the operating system can execute.

Everything after -- is passed to your program:

Terminal
glyip run -- --flag value

glyip run builds first, then executes the binary, and exits with the child’s exit status. A program that exits with a failure status produces a failing glyip run invocation.

Pass a target triple to build for another architecture:

Terminal
glyip run --target aarch64-unknown-linux-gnu

The default triple is the host triple (derived from std::env::consts). The same --target flag exists on glyim (see the CLI reference).