Skip to main content

build

Function build 

Source
pub fn build(config: BuildConfig) -> Result<BuildResult, BuildError>
Expand description

Build a LOGOS project.

Compiles the project specified in config through the full build pipeline:

  1. Load and validate the manifest
  2. Compile LOGOS source to Rust
  3. Generate a Cargo project with runtime dependencies
  4. Run cargo build

The entry point is determined from the manifest’s package.entry field, with a .md extension fallback if the .lg file doesn’t exist.

§Errors

Returns an error if:

  • The manifest cannot be loaded
  • The entry point file doesn’t exist
  • LOGOS compilation fails
  • Cargo build fails