Skip to content

glyip Reference

Reference2 min read
Edit page

glyip is Cargo’s counterpart for Glyim projects. It reads a Glyip.toml manifest, resolves dependencies with SemVer 2.0 matching, maintains a Glyip.lock lockfile, and drives the compiler.

Scaffold a new project.

Argument / flag Type Default Description
<NAME> string — Project name.
--lib flag off Create a library project instead of a binary.
--edition <EDITION> string 2024 Language edition.
Terminal
glyip new my_project
glyip new my_lib --lib

Compile the project. Builds are incremental — sources and build configuration are fingerprinted with SHA-256.

Flag Type Default Description
--release flag off Build in release mode.
--target <TRIPLE> string host Target triple.
--backend <NAME> llvm | bytecode llvm Codegen backend. bytecode output is not directly runnable.
--opt-level <N> 0–3 0 Optimization level.
--lto <KIND> off | thin | fat off Link-time optimization. Unknown values are treated as off.
Terminal
glyip build --release --opt-level 2

Run the project’s tests.

Flag Type Default Description
--release flag off Build in release mode.
--filter <SUBSTRING> string all Run only tests whose name contains the substring.
--no-run flag off Compile the tests but do not run them.
--compiled flag off Compile each test file to a native executable and run it as a real subprocess instead of the in-process MIR interpreter.
Terminal
glyip test --filter parser --compiled

Build and execute the project’s binary. Always uses the LLVM backend, because running requires an executable the operating system can start. Exits with the child’s exit status.

Flag Type Default Description
--release flag off Build in release mode.
--target <TRIPLE> string host Target triple.
--lto <KIND> off | thin | fat off Link-time optimization.
-- <ARGS> strings none Everything after -- is passed to the program.
Terminal
glyip run -- --flag value

The manifest is parsed with unknown-key rejection: an unrecognized key is an error.

Key Type Default Required Description
name string — Required Crate name.
version string "0.1.0" Optional Semantic version.
edition string "2024" Optional Language edition.
authors string array [] Optional Author list.
description string none Optional Short description.
bin table array none Optional Binary targets.
lib table none Optional Library target.

Each bin entry accepts name (required) and path (source file, relative to the project root). The lib entry accepts path.

Both sections map a crate name to either a bare version requirement or a detail table:

Glyip.toml
[dependencies]
serde = "1.0"
local_util = { path = "../local_util" }
my_crate = { git = "https://github.com/example/my_crate", tag = "v0.3.0" }
[dev-dependencies]
test_helpers = { path = "../test_helpers" }
Key Type Description
version string SemVer 2.0 requirement — caret, tilde, wildcard, and comparison operators are supported.
path path Local filesystem dependency.
git URL Git repository dependency.
branch string Track a named branch (resolved to its current tip commit).
tag string Track a named tag (resolved to the commit the tag points at).
rev string Pin an exact revision hash.

Exactly one git ref is active; without branch, tag, or rev, the repository’s default branch tip is used.

glyip maintains Glyip.lock with entries keyed by name-version, so repeated builds resolve the same graph. The conflict check enforces one resolved version per crate name — see manage dependencies for the resolver’s exact semantics.

See manage dependencies for practical workflows, and test your code for testing patterns.