Skip to main content

rune/compile/
mod.rs

1//! The Rune compiler.
2//!
3//! The main entry to compiling rune source is [prepare][crate::prepare] which
4//! uses this compiler. In here you'll just find compiler-specific types.
5
6mod assembly;
7pub(crate) use self::assembly::{Assembly, AssemblyInst};
8
9pub(crate) mod error;
10pub(crate) use self::error::ErrorKind;
11pub use self::error::{Error, ImportStep, MetaError};
12
13mod compile_visitor;
14pub use self::compile_visitor::CompileVisitor;
15#[cfg(feature = "std")]
16pub(crate) use self::compile_visitor::NoopCompileVisitor;
17
18pub(crate) mod context;
19pub use self::context::Context;
20
21pub(crate) mod context_error;
22pub use self::context_error::ContextError;
23
24pub(crate) mod meta_info;
25pub use meta_info::MetaInfo;
26
27mod docs;
28pub(crate) use self::docs::Docs;
29
30mod prelude;
31pub(crate) use self::prelude::Prelude;
32
33pub(crate) mod const_eval;
34pub(crate) use self::const_eval::ConstUnit;
35
36mod source_loader;
37#[cfg(feature = "std")]
38pub use self::source_loader::FileSourceLoader;
39pub use self::source_loader::{NoopSourceLoader, SourceLoader};
40
41mod unit_builder;
42pub use self::unit_builder::LinkerError;
43pub(crate) use self::unit_builder::UnitBuilder;
44
45pub(crate) mod v2;
46
47mod options;
48#[cfg(any(feature = "fmt", feature = "languageserver"))]
49pub(crate) use self::options::{FmtOptions, IndentStyle};
50pub use self::options::{Options, ParseOptionError};
51
52mod location;
53pub(crate) use self::location::DynLocation;
54pub use self::location::{Located, Location};
55
56pub mod meta;
57pub(crate) use self::meta::{Doc, ItemMeta};
58pub use self::meta::{MetaRef, SourceMeta};
59
60mod pool;
61pub use self::pool::ItemId;
62pub(crate) use self::pool::{ModId, ModMeta, Pool};
63
64mod named;
65pub use self::named::Named;
66
67mod names;
68pub(crate) use self::names::Names;
69
70pub(crate) mod num;
71
72mod visibility;
73pub(crate) use self::visibility::Visibility;
74
75mod with_span;
76pub(crate) use self::with_span::{HasSpan, WithSpan};
77
78mod compile;
79pub(crate) use self::compile::compile;
80
81/// Helper alias for compile results.
82pub type Result<T, E = Error> = core::result::Result<T, E>;