Crate rustpython_vm

Source
Expand description

This crate contains most python logic.

  • Compilation
  • Bytecode
  • Import mechanics
  • Base objects

Re-exports§

pub use self::convert::TryFromBorrowedObject;
pub use self::convert::TryFromObject;
pub use self::object::AsObject;
pub use self::object::Py;
pub use self::object::PyAtomicRef;
pub use self::object::PyExact;
pub use self::object::PyObject;
pub use self::object::PyObjectRef;
pub use self::object::PyPayload;
pub use self::object::PyRef;
pub use self::object::PyRefExact;
pub use self::object::PyResult;
pub use self::object::PyWeakRef;
pub use self::vm::Context;
pub use self::vm::Interpreter;
pub use self::vm::Settings;
pub use self::vm::VirtualMachine;
pub use rustpython_common as common;
pub use rustpython_literal as literal;

Modules§

buffer
builtins
This package contains the python basic/builtin types 7 common PyRef type aliases are exposed - PyBytesRef, PyDictRef, PyIntRef, PyListRef, PyStrRef, PyTypeRef, PyTupleRef Do not add more PyRef type aliases. They will be rare enough to use directly PyRef.
byte
byte operation APIs
bytecode
Implement python as a virtual machine with bytecode. This module implements bytecode structure.
cformat
Implementation of Printf-Style string formatting as per the Python Docs.
class
Utilities to define a new Python class
compiler
convert
eval
exceptions
format
frame
frozen
function
import
iter
object
ospath
prelude
protocol
py_io
readline
recursion
scope
sequence
signal
sliceable
source_code
stdlib
suggestion
types
utils
version
vm
Implement virtual machine to run instructions.
warn

Macros§

atomic_func
class_or_notimplemented
define_methods
extend_class
extend_module
identifier
match_class
Macro to match on the built-in class of a Python object.
named_function
py_class
py_compile
py_freeze
py_namespace

Attribute Macros§

pyclass
pyexception
Helper macro to define Exception types. More-or-less is an alias to pyclass macro.
pymodule

Derive Macros§

FromArgs
PyPayload
PyStructSequence
Traverse
use on struct with named fields like struct A{x:PyRef<B>, y:PyRef<C>} to impl Traverse for datatype.
TryIntoPyStructSequence