Skip to main content

quickjs_oxide/engine/api/core/
mod.rs

1//! The embedding API over `quickjs-oxide-core`: one realm per runtime, values as
2//! Rust data or handles, the host as one trait, host functions with a
3//! [`Scope`], module loaders with a [`ModuleScope`].
4
5mod buffer;
6pub(crate) mod compile;
7mod context;
8mod convert;
9mod error;
10mod function;
11mod module;
12mod ops;
13mod promise;
14mod property;
15mod runtime;
16#[cfg(feature = "test262-host")]
17pub mod test262;
18mod value;
19
20pub use buffer::{TypedArrayKind, TypedArrayView};
21pub use context::{Context, EvalOptions, FunctionBytecodeRef, ModuleBytecodeRef, QjsHelpers};
22pub use convert::{FromJs, IntoJs};
23pub use error::RuntimeError;
24pub use function::{FunctionOptions, HostFunction, Raw, Scope};
25pub use module::{CompiledModule, ModuleLoader, ModuleScope, ModuleSource};
26pub use ops::{Js, JsResult};
27pub use promise::PromiseCapability;
28pub use property::{
29    AccessorValue, CompleteOrdinaryPropertyDescriptor, DescriptorField, OrdinaryPropertyDescriptor,
30    PropertyKey, WellKnownSymbol,
31};
32pub use runtime::{
33    GcPolicy, GcStats, InterruptHandle, PendingJobOutcome, PromiseSnapshot, PromiseState, Runtime,
34    SystemHost,
35};
36pub use value::{CallableRef, ObjectRef, SymbolRef, Value};
37
38pub use crate::engine::api::error::{Error, ErrorKind, NativeErrorKind};
39pub use crate::engine::api::{declare_thread_stack, number_to_string, quickjs_detect_module_bytes};
40pub use crate::engine::code::debug::DebugInfoMode;
41pub use crate::engine::code::module::{ModuleImportAttribute, ModuleImportAttributes};
42pub use crate::engine::compiler::CompileOptions;
43pub use crate::engine::value::bigint::{BigIntError, JsBigInt};
44pub use crate::engine::value::{JsString, JsStringError};
45/// The core's value, which [`Host::promise_rejection`] receives.
46pub use oxide_core::Value as CoreValue;
47pub use oxide_core::host::{Host, RejectionEvent, Stream};
48pub use oxide_core::{HeapLimits, MemoryReport, RuntimeOptions};
49
50#[cfg(test)]
51mod tests;