[][src]Crate runestick

Rune Logo

Visit the site 🌐 - Read the book 📖

Build Status Site Status crates.io docs.rs Chat on Discord

A stack-based virtual machine for the Rust programming language.

This is the driver for the Rune Language.

Re-exports

pub use self::format::Format;
pub use self::format::FormatSpec;
pub use self::module::InstFnNameHash;
pub use self::module::InstallWith;
pub use self::module::Module;
pub use crate::debug::DebugInfo;
pub use crate::debug::DebugInst;

Modules

budget

Budgeting module for Runestick.

debug

Debug information for units.

format

Types for dealing with formatting specifications.

module

Crate used for definint native modules.

modules

Public packages that can be used to provide functionality to virtual machines.

Macros

span

Construct a span that can be used during pattern matching.

Structs

AnyObj

Our own private dynamic Any implementation.

AnyObjVtable

The vtable for any type stored in the virtual machine.

BorrowMut

Guard for data exclusively borrowed from a slot in the virtual machine.

BorrowRef

Guard for a data borrowed from a slot in the virtual machine.

ByteIndex

A single index in a Span, like the start or ending index.

Bytes

A vector of bytes.

CallFrame

A call frame.

CompileItem

Item and the module that the item belongs to.

CompileMeta

Compile-time metadata about a unit.

CompileMetaCapture

Metadata about a closure.

CompileMetaEmpty

The metadata about a type.

CompileMetaStruct

The metadata about a type.

CompileMetaTuple

The metadata about a variant.

CompileMod

Module, its item and its visibility.

CompileSource

Information on a compile sourc.

Context

Static run context visible to the virtual machine.

ContextTypeInfo

Information on a specific type.

DebugLabel

A label that can be jumped to.

Future

A type-erased future that can only be unsafely polled in combination with the virtual machine that created it.

Generator

A generator with a stored virtual machine.

Hash

The hash of a primitive thing.

Id

An opaque identifier that is associated with AST items.

Item

The name of an item.

Iterator

An owning iterator.

Label

A label that can be jumped to.

Location

A source location.

Mut

A strong mutable reference to the given type.

Names

A tree of names.

NotAccessibleMut

Error raised when tried to access for exclusive access but it was not accessible.

NotAccessibleRef

Error raised when tried to access for shared access but it was not accessible.

Object

Struct representing a dynamic anonymous object.

Panic

A descriptibe panic.

Protocol

A built in instance function.

Range

Struct representing a dynamic anonymous object.

RawAccessGuard

A raw guard around some level of access.

RawMut

A raw guard to a Ref.

RawRef

A raw guard to a Ref.

RawStr

A raw static string.

Ref

A strong reference to the given type.

Rtti

Runtime information on variant.

RuntimeContext

Static run context visible to the virtual machine.

Select

A stored select.

Shared

A shared value.

SharedPointerGuard

A guard for an Any containing a pointer.

Source

A single source file.

Span

A span corresponding to a range in the source file being parsed.

SpannedError

An error with an associated span.

Stack

The stack of the virtual machine, where all values are stored.

StackError

An error raised when interacting with the stack.

StaticString

Struct representing a static string.

StaticType

Static type information.

Stream

A stream with a stored virtual machine.

Struct

An object with a well-defined type.

Tuple

Struct representing a dynamic anonymous object.

TupleStruct

A tuple with a well-defined type.

Unit

Instructions from a single source file.

UnitStruct

A empty with a well-defined type.

Variant

The variant of a type.

VariantRtti

Runtime information on variant.

Vec

Struct representing a dynamic vector.

VecTuple

A helper type to deserialize arrays with different interior types.

Vm

A stack which references variables indirectly from a slab.

VmCall

An instruction to push a virtual machine to the execution.

VmError

Errors raised by the execution of the virtual machine.

VmExecution

The execution environment for a virtual machine.

VmIntegerRepr

A type-erased rust number.

VmSendExecution

A wrapper that makes VmExecution Send.

Enums

AccessError

An error raised while downcasting.

AnyObjError

Errors raised during casting operations.

Awaited

A stored await task.

Call

How the function is called.

CompileMetaKind

Compile-time metadata kind about a unit.

Component

The component of an item.

ComponentRef

A reference to a component of an item.

ConstValue

A constant value.

ContextError

An error raised when building the context.

ContextSignature

A description of a function signature.

GeneratorState

The state of a generator.

Inst

An operation in the stack-based virtual machine.

InstAddress

How an instruction addresses a value.

InstAssignOp

An operation between two values on the machine.

InstOp

An operation between two values on the machine.

InstRangeLimits

Range limits of a range expression.

InstTarget

The target of an operation.

InstValue

A literal value that can be pushed.

InstVariant

A variant that can be constructed.

Key

A key that can be used as an anonymous object key.

PanicReason

Pre-canned panic reasons.

RangeLimits

The limits of a range.

TypeCheck

An encoded type check.

TypeInfo

Type information about a value, that can be printed for human consumption through its Display implementation.

UnitFn

The kind and necessary information on registered functions.

Value

An entry on the stack.

VariantData

The data of the variant.

Visibility

Information on the visibility of an item.

VmErrorKind

The kind of error encountered.

VmHalt

The reason why the virtual machine execution stopped.

VmHaltInfo

The reason why the virtual machine execution stopped.

Statics

BOOL_TYPE

The specialized type information for a bool type.

BYTES_TYPE

The specialized type information for a bytes type.

BYTE_TYPE

The specialized type information for a byte type.

CHAR_TYPE

The specialized type information for a char type.

FLOAT_TYPE

The specialized type information for a float type.

FORMAT_TYPE

The specialized type information for a fmt spec types.

FUNCTION_TYPE

The specialized type information for a function pointer type.

FUTURE_TYPE

The specialized type information for a future type.

GENERATOR_STATE_TYPE

The specialized type information for a generator state type.

GENERATOR_TYPE

The specialized type information for a generator type.

INTEGER_TYPE

The specialized type information for a integer type.

ITERATOR_TYPE

The specialized type information for the iterator type.

OBJECT_TYPE

The specialized type information for an anonymous object type.

OPTION_TYPE

The specialized type information for a option type.

RANGE_TYPE

The specialized type information for the range type.

RESULT_TYPE

The specialized type information for a result type.

STREAM_TYPE

The specialized type information for the Stream type.

STRING_TYPE

The specialized type information for a string type.

TUPLE_TYPE

The specialized type information for an anonymous tuple type.

TYPE

The specialized type information for type objects.

UNIT_TYPE

The specialized type information for a unit.

VEC_TYPE

The specialized type information for a vector type.

Traits

Any

A trait which can be stored inside of an AnyObj.

Args

Trait for converting arguments onto the stack.

FromValue

Trait for converting from a value.

GuardedArgs

Trait for converting arguments onto the stack.

IntoByteIndex

Convert the given type into an index.

IntoComponent

Trait for encoding the current type into a component.

IntoTypeHash

Helper conversion into a function hash.

Named

Something that is named.

ToValue

Trait for converting types into values.

TypeOf

Trait used for Rust types for which we can determine the runtime type of.

UnsafeFromValue

A potentially unsafe conversion for value conversion.

UnsafeToValue

Trait for converting types into values.

WithSpan

Trait to coerce a result of a non-spanned error into a spanned error.

Type Definitions

Error

Exported boxed error type for convenience.

Function

A callable non-sync function.

Result

Exported result type for convenience.

SourceId

The identifier of a source file.

SyncFunction

A callable sync function. This currently only supports a subset of values that are supported by the Vm.

Derive Macros

Any

Macro to mark a value as external, which will implement all the appropriate traits.

FromValue

Conversion macro for constructing proxy objects from a dynamic value.