[][src]Crate runestick

Read the Book 📖

Build Status Book Status Chat on Discord

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

This is the driver for the [Rune language]. [Rune Language]: https://github.com/rune-rs/rune

Re-exports

pub use self::module::Module;
pub use crate::unit::ImportEntry;
pub use crate::unit::ImportKey;
pub use crate::unit::Unit;
pub use crate::unit::UnitError;

Modules

module

Crate used for definint native modules.

modules

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

unit

A single execution unit in the runestick virtual machine.

Macros

decl_external

Implement the value trait for an external type.

decl_internal

Implement the value trait for an internal type.

Structs

Any

Our own private dynamic Any implementation.

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.

Bytes

A vector of bytes.

Context

Static run context visible to the virtual machine.

DebugInfo

Debug information about a unit.

DebugInst

Debug information for every instruction.

Function

A stored function, of some specific kind.

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.

Item

The name of an item.

MetaClosureCapture

Metadata about a closure.

MetaStruct

The metadata about a type.

MetaTuple

The metadata about a variant.

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.

OwnedMut

A strong mutable reference to the given type.

OwnedRef

A strong reference to the given type.

Panic

A descriptibe panic.

Protocol

A built in instance function.

RawBorrowedMut

A raw mutable guard.

RawBorrowedRef

A raw reference guard.

RawOwnedMut

A raw guard to a OwnedRef.

RawOwnedRef

A raw guard to a OwnedRef.

Select

A stored select.

Shared

A shared value.

Source

A single source file.

Span

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

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.

Tuple

Struct representing an anonymous tuple.

TypedObject

An object with a well-defined type.

TypedTuple

A tuple with a well-defined type.

VariantObject

An object with a well-defined variant of an enum.

VariantTuple

A tuple with a well-defined type as a variant of an enum.

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.

Enums

AccessError

An error raised while downcasting.

Awaited

A stored await task.

Call

How the function is called.

Component

The component of an item.

ContextError

An error raised when building the context.

GeneratorState

The state of a generator.

Inst

An operation in the stack-based virtual machine.

Integer

A type-erased rust number.

Meta

Metadata about an item in the context.

PanicReason

Pre-canned panic reasons.

TypeCheck

An encoded type check.

Value

An entry on the stack.

ValueType

The type of an entry.

ValueTypeInfo

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

VmErrorKind

The kind of error encountered.

VmHalt

The reason why the virtual machine execution stopped.

VmHaltInfo

The reason why the virtual machine execution stopped.

Constants

ADD

The function to implement for the addition operation.

ADD_ASSIGN

The function to implement for the addition assign operation.

DIV

The function to implement for the division operation.

DIV_ASSIGN

The function to implement for the division assign operation.

INDEX_GET

The function to access an index.

INDEX_SET

The function to set an index.

INTO_FUTURE

Function used to convert an argument into a future.

INTO_ITER

Function used to convert an argument into an iterator.

MUL

The function to implement for the multiply operation.

MUL_ASSIGN

The function to implement for the multiply assign operation.

NEXT

The function to call to continue iteration.

REM

The function to implement for the modulo operation.

STRING_DISPLAY

Protocol function used by template strings.

SUB

The function to implement for the subtraction operation.

SUB_ASSIGN

The function to implement for the subtraction assign operation.

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.

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.

OBJECT_TYPE

The specialized type information for an anonymous object type.

OPTION_TYPE

The specialized type information for a option 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.

UNIT_TYPE

The specialized type information for a unit.

VEC_TYPE

The specialized type information for a vector type.

Traits

FromValue

Trait for converting from a value.

IntoArgs

Trait for converting arguments into values unsafely.

IntoHash

Helper conversion into a function hash.

IntoInstFnHash

Trait used to determine what can be used as an instance function name.

ReflectValueType

Trait for converting types into values.

ToValue

Trait for converting types into values.

UnsafeFromValue

A potentially unsafe conversion for value conversion.

Type Definitions

Error

Exported boxed error type for convenience.

Object

The type of an object.

Result

Exported result type for convenience.