Build and Run Your Project
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.
Build a project
Section titled “Build a project”Run this command in the directory that contains your Glyip.toml:
1glyip buildThe build is incremental: glyip fingerprints sources and build configuration with SHA-256 and recompiles only what changed.
Build in release mode
Section titled “Build in release mode”1glyip build --releaseCombine --release with an explicit optimization level and LTO strategy when you want a tuned build:
1glyip build --release --opt-level 2 --lto thinChoose a backend
Section titled “Choose a backend”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):
1glyip build --backend bytecodeglyip run always builds with the LLVM backend, because running needs something the operating system can execute.
Run your program with arguments
Section titled “Run your program with arguments”Everything after -- is passed to your program:
1glyip run -- --flag valueglyip 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.
Cross-compile with a target triple
Section titled “Cross-compile with a target triple”Pass a target triple to build for another architecture:
1glyip run --target aarch64-unknown-linux-gnuThe default triple is the host triple (derived from std::env::consts). The same --target flag exists on glyim (see the CLI reference).
