1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! LOGOS CLI (`largo`)
//!
//! Command-line interface for the LOGOS build system and package registry.
//!
//! This crate provides the `largo` CLI tool for creating, building, and
//! publishing LOGOS projects. It can be used as a library for programmatic
//! access to the build system.
//!
//! # Commands
//!
//! | Command | Description |
//! |---------|-------------|
//! | `largo new` | Create a new project |
//! | `largo init` | Initialize project in current directory |
//! | `largo build` | Compile a LOGOS module to Rust |
//! | `largo run` | Build and execute a module |
//! | `largo check` | Type-check without building |
//! | `largo verify` | Run Z3 static verification |
//! | `largo publish` | Publish package to registry |
//! | `largo login` | Authenticate with registry |
//! | `largo logout` | Remove stored credentials |
//!
//! # Module Structure
//!
//! - [`cli`] - Command-line argument parsing and dispatch
//! - [`compile`] - Re-exports from the compilation pipeline
//! - [`project`] - Project management (manifest, build, registry)
//! - [`project::manifest`] - `Largo.toml` parsing
//! - [`project::build`][mod@project::build] - Build orchestration
//! - [`project::credentials`] - API token storage
//! - [`project::registry`] - Package registry client
//!
//! # Feature Flags
//!
//! | Feature | Description |
//! |---------|-------------|
//! | `verification` | Enable Z3 static verification (requires Z3 installed) |
//!
//! # Library Usage
//!
//! While `largo` is primarily a CLI tool, the library API can be used
//! for build system integration:
//!
//! ```no_run
//! use logicaffeine_cli::project::{BuildConfig, build, find_project_root};
//! use std::env;
//!
//! let cwd = env::current_dir().unwrap();
//! let root = find_project_root(&cwd).expect("Not in a LOGOS project");
//!
//! let result = build(BuildConfig {
//! project_dir: root,
//! release: false,
//! lib_mode: false,
//! target: None,
//! })?;
//!
//! println!("Built: {}", result.binary_path.display());
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
/// Re-export of the LOGOS interface types from the kernel crate.
///
/// Provides access to core types like `World` and `Entity` for
/// integration with the LOGOS runtime.
pub use interface;
/// Re-export of analysis utilities from the compile crate.
///
/// Useful for tooling that needs to analyze LOGOS source without
/// performing a full build.
pub use analysis;
/// Entry point for the CLI.
///
/// Parses command-line arguments and executes the appropriate command.
/// See [`cli::run_cli`] for details.
pub use run_cli;