Expand description
The quickjs-oxide core: 8-byte NaN-boxed values, typed arenas, a value heap
with range allocation and a non-moving mark-sweep collector; register
bytecode and the loop that runs it; the builtins, the host boundary and the
embedder’s entries. See core/README.md.
Re-exports§
pub use builtins::agent::ScriptRunner;pub use bytecode::CodeStore;pub use bytecode::CodeUnit;pub use bytecode::CodeUnitId;pub use bytecode::Insn;pub use bytecode::Opcode;pub use bytecode::UnitRef;pub use bytecode::Units;pub use embed::KeyName;pub use embed::NativeCx;pub use embed::PropertyDescriptor;pub use heap::atom::KeyKind;pub use heap::atom::PropertyKey;pub use heap::gc::Handle;pub use heap::gc::HeapLimits;pub use heap::gc::RootMark;pub use heap::object::ObjectKind;pub use heap::report::MemoryReport;pub use heap::AtomMode;pub use heap::BytecodeTemplate;pub use heap::Heap;pub use heap::HeapError;pub use runtime::Intrinsic;pub use runtime::Realm;pub use runtime::Runtime;pub use runtime::RuntimeOptions;pub use runtime::ThrownSummary;pub use shape::PropertyFlags;pub use value::BigIntId;pub use value::BytecodeId;pub use value::Kind;pub use value::ObjectId;pub use value::ScopeId;pub use value::ShapeId;pub use value::StringId;pub use value::SymbolId;pub use value::ValidityCellId;pub use value::Value;pub use vm::ErrorKind;pub use vm::Output;pub use vm::Throw;
Modules§
- builtins
- The realm’s builtins, as natives. One file per builtin object.
- bytecode
- Register bytecode: fixed-width instructions, code units and the store that owns them.
- embed
- The embedder’s entries: the object, property, conversion and
value-construction operations the root crate’s API exposes, each one engine
entry over the internal operations the loop uses. They are implemented
once, on
NativeCx, which aRuntimelends between entries (Runtime::native_cx) and the loop lends to a host function while it runs;Runtimekeeps each as a delegation. - heap
- The heap: typed arenas, the value heap, the collector and the root set.
- host
- The host boundary: what the core asks of its embedder.
quickjs-oxide-corereaches the platform only through this trait, so it stays dependency-free and a port supplies its own implementation. - runtime
- The
Runtime: the heap, the code store and the realm. Every operation isfn(&mut Runtime, …); there is no shared interior mutability. - shape
- Shapes: the transition tree, dictionary mode and prototype validity cells.
- value
- The 8-byte NaN-boxed
Valueand the heap identifiers it carries. - vm
- The register machine: the register file and frame table, the main loop, its slow paths, exception unwinding and the leaf-native ABI.