35 releases
Uses new Rust 2024
| 0.2.26 | Aug 18, 2025 |
|---|---|
| 0.2.25 | Aug 16, 2025 |
| 0.2.19 | Jul 30, 2025 |
| 0.1.16 | Apr 7, 2025 |
| 0.0.14 | Apr 1, 2025 |
#1064 in Programming languages
Used in 8 crates
(4 directly)
675KB
15K
SLoC
Swamp Compile
The main orchestrator for the Swamp programming language compilation pipeline.
Overview
This crate ties together various stages of the Swamp compiler to transform source code into a fully analyzed program representation (swamp_semantic::Program). It manages the overall process, including setting up the environment, resolving dependencies, and invoking the semantic analyzer.
Key Responsibilities
- Bootstrapping: Initializes the core library (
swamp-core) and the default symbol table. - Source Map Setup: Creates and manages the
SourceMapfor tracking file locations. - Dependency Resolution & Parsing: Uses
swamp-dep-loaderto parse the main module and its dependencies, determining the correct analysis order. - Analysis Orchestration: Uses
swamp-program-analyzerto drive the semantic analysis (swamp-analyzer) of all modules in the correct order. - Error Reporting: Integrates with
swamp-error-reportto display compilation errors with source context. - High-Level API: Provides functions like
bootstrap_and_compileto run the entire pipeline.
Installation
This crate is typically used as the main entry point for compiling Swamp code, either as a library or within a command-line tool.
[dependencies]
swamp-compile = "0.2.26"
Dependencies
~9–15MB
~201K SLoC