Skip to main content

Module build

Module build 

Source
Expand description

Phase 37: Build Orchestration

Coordinates the build process for LOGOS projects.

This module handles the complete build pipeline:

  1. Load the project manifest (Largo.toml)
  2. Compile LOGOS source to Rust code
  3. Set up a Cargo project with runtime dependencies
  4. Invoke cargo build to produce the final binary

§Build Directory Structure

target/
├── debug/
│   └── build/           # Generated Cargo project (debug)
│       ├── Cargo.toml
│       ├── src/main.rs  # Generated Rust code
│       └── target/      # Cargo's output
└── release/
    └── build/           # Generated Cargo project (release)

Structs§

BuildConfig
Configuration for a build operation.
BuildResult
Result of a successful build operation.
CargoFailure
A classified cargo build failure. The full output already streamed to the terminal; this carries the verdict plus the retained tail for programmatic callers.

Enums§

Backend
Native executable backend selected by largo build / largo run.
BuildError
Errors that can occur during the build process.
CargoFailureKind
What actually went wrong when cargo build failed, judged from its stderr tail.

Functions§

build
Build a LOGOS project.
build_backend
Build through an explicitly selected native executable backend.
classify_cargo_failure
Judge a failed cargo build from its stderr tail.
find_project_root
Find the project root by walking up the directory tree.
requires_component_is_safe
Whether a ## Requires crate name / version / feature is safe to write into the generated Cargo.toml verbatim: strictly alphanumerics plus the characters cargo specs actually use. Anything else (quotes, newlines, brackets) could smuggle TOML structure into the manifest.
run
Execute a built LOGOS project.