1#![deny(missing_docs)]
48#![allow(clippy::enum_variant_names, clippy::too_many_arguments)]
49
50mod any;
51mod context;
52mod value;
53mod vm;
54#[macro_use]
55mod macros;
56mod access;
57mod any_obj;
58mod args;
59mod awaited;
60pub mod budget;
61mod bytes;
62mod call;
63mod compile_meta;
64mod const_value;
65pub mod debug;
66mod env;
67pub mod format;
68mod from_value;
69mod function;
70mod future;
71mod generator;
72mod generator_state;
73mod guarded_args;
74mod hash;
75mod id;
76mod inst;
77mod internal;
78mod item;
79mod iterator;
80mod key;
81mod label;
82mod location;
83pub mod module;
84pub mod modules;
85mod named;
86mod names;
87mod object;
88mod panic;
89mod protocol;
90mod protocol_caller;
91mod range;
92mod raw_str;
93mod runtime_context;
94mod select;
95mod shared;
96mod source;
97mod span;
98mod spanned_error;
99mod stack;
100mod static_string;
101mod static_type;
102mod stream;
103mod to_value;
104mod tuple;
105mod type_info;
106mod type_of;
107mod unit;
108mod variant;
109mod vec;
110mod vec_tuple;
111mod visibility;
112mod vm_call;
113mod vm_error;
114mod vm_execution;
115mod vm_halt;
116
117#[macro_export]
132macro_rules! span {
133 ($start:expr, $end:expr) => {
134 $crate::Span {
135 start: $crate::ByteIndex($start),
136 end: $crate::ByteIndex($end),
137 }
138 };
139}
140
141pub type SourceId = usize;
143
144pub type Result<T, E = anyhow::Error> = std::result::Result<T, E>;
146
147pub type Error = anyhow::Error;
149
150pub use self::any_obj::{AnyObj, AnyObjError, AnyObjVtable};
151pub use self::args::Args;
152pub use self::compile_meta::{
153 CompileItem, CompileMeta, CompileMetaCapture, CompileMetaEmpty, CompileMetaKind,
154 CompileMetaStruct, CompileMetaTuple, CompileMod, CompileSource,
155};
156pub use self::const_value::ConstValue;
157pub use self::format::{Format, FormatSpec};
158pub use self::from_value::{FromValue, UnsafeFromValue};
159pub use self::generator::Generator;
160pub use self::generator_state::GeneratorState;
161pub use self::guarded_args::GuardedArgs;
162pub use self::id::Id;
163pub use self::iterator::Iterator;
164pub use self::key::Key;
165pub use self::label::{DebugLabel, Label};
166pub use self::location::Location;
167pub use self::module::{InstFnNameHash, InstallWith, Module};
168pub use self::named::Named;
169pub use self::raw_str::RawStr;
170pub use self::runtime_context::RuntimeContext;
171pub use self::select::Select;
172pub use self::source::Source;
173pub use self::span::{ByteIndex, IntoByteIndex, Span};
174pub use self::spanned_error::{SpannedError, WithSpan};
175pub use self::static_string::StaticString;
176pub use self::static_type::{
177 StaticType, BOOL_TYPE, BYTES_TYPE, BYTE_TYPE, CHAR_TYPE, FLOAT_TYPE, FORMAT_TYPE,
178 FUNCTION_TYPE, FUTURE_TYPE, GENERATOR_STATE_TYPE, GENERATOR_TYPE, INTEGER_TYPE, ITERATOR_TYPE,
179 OBJECT_TYPE, OPTION_TYPE, RANGE_TYPE, RESULT_TYPE, STREAM_TYPE, STRING_TYPE, TUPLE_TYPE, TYPE,
180 UNIT_TYPE, VEC_TYPE,
181};
182pub use self::stream::Stream;
183pub use self::to_value::{ToValue, UnsafeToValue};
184pub use self::tuple::Tuple;
185pub use self::type_info::TypeInfo;
186pub use self::variant::{Variant, VariantData};
187pub use self::vec::Vec;
188pub use crate::access::{
189 AccessError, BorrowMut, BorrowRef, NotAccessibleMut, NotAccessibleRef, RawAccessGuard,
190};
191pub use crate::any::Any;
192pub use crate::awaited::Awaited;
193pub use crate::bytes::Bytes;
194pub use crate::call::Call;
195pub use crate::context::{Context, ContextError, ContextSignature, ContextTypeInfo};
196pub use crate::debug::{DebugInfo, DebugInst};
197pub use crate::function::{Function, SyncFunction};
198pub use crate::future::Future;
199pub use crate::hash::{Hash, IntoTypeHash};
200pub use crate::inst::{
201 Inst, InstAddress, InstAssignOp, InstOp, InstRangeLimits, InstTarget, InstValue, InstVariant,
202 PanicReason, TypeCheck,
203};
204pub use crate::item::{Component, ComponentRef, IntoComponent, Item};
205pub use crate::names::Names;
206pub use crate::object::Object;
207pub use crate::panic::Panic;
208pub use crate::protocol::Protocol;
209pub use crate::range::{Range, RangeLimits};
210pub use crate::shared::{Mut, RawMut, RawRef, Ref, Shared, SharedPointerGuard};
211pub use crate::stack::{Stack, StackError};
212pub use crate::type_of::TypeOf;
213pub use crate::unit::{Unit, UnitFn};
214pub use crate::value::{Rtti, Struct, TupleStruct, UnitStruct, Value, VariantRtti};
215pub use crate::vec_tuple::VecTuple;
216pub use crate::visibility::Visibility;
217pub use crate::vm::{CallFrame, Vm};
218pub use crate::vm_call::VmCall;
219pub use crate::vm_error::{VmError, VmErrorKind, VmIntegerRepr};
220pub use crate::vm_execution::{VmExecution, VmSendExecution};
221pub use crate::vm_halt::{VmHalt, VmHaltInfo};
222pub(crate) use runestick_macros::__internal_impl_any;
223pub use runestick_macros::{Any, FromValue};
224
225mod collections {
226 pub use hashbrown::{hash_map, HashMap};
227 pub use hashbrown::{hash_set, HashSet};
228 pub use std::collections::{btree_map, BTreeMap};
229}