pub struct Compiler { /* private fields */ }Expand description
The compiler-facing integration object. Construction validates the public manifest/catalog contract once and exposes the pinned catalog identity.
Implementations§
Source§impl Compiler
impl Compiler
pub fn new() -> Result<Self, IntegrationError>
pub fn catalog_identity(&self) -> CatalogIdentity
pub fn link_report(&self) -> LinkReport
Sourcepub fn compile_hir(
&self,
hir: &Program,
) -> Result<CompilationArtifact, IntegrationError>
pub fn compile_hir( &self, hir: &Program, ) -> Result<CompilationArtifact, IntegrationError>
Lower a resolved OPY HIR program into canonical WIR, validate it against the canonical catalog, and emit deterministic en-US Workshop.
Sourcepub fn compile_hir_with_locale(
&self,
hir: &Program,
locale: &Locale,
) -> Result<CompilationArtifact, IntegrationError>
pub fn compile_hir_with_locale( &self, hir: &Program, locale: &Locale, ) -> Result<CompilationArtifact, IntegrationError>
Lower and emit using a locale declared by the canonical catalog.
Sourcepub fn compile_source(
&self,
source: &str,
main_path: &str,
root: &Path,
locale: &Locale,
) -> Result<CompilationArtifact, IntegrationError>
pub fn compile_source( &self, source: &str, main_path: &str, root: &Path, locale: &Locale, ) -> Result<CompilationArtifact, IntegrationError>
Compile source and run a declared post-compile hook only after the final Workshop emission has succeeded.
Auto Trait Implementations§
impl Freeze for Compiler
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
impl UnwindSafe for Compiler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more