Crate rquickjs_core
source ·Expand description
High-level bindings to quickjs
The rquickjs
crate provides safe high-level bindings to the quickjs javascript engine.
This crate is heavily inspired by the rlua crate.
Re-exports
pub use runtime::AsyncRuntime;
futures
pub use runtime::Runtime;
pub use context::AsyncContext;
futures
pub use context::Context;
pub use context::Ctx;
pub use class::Class;
classes
Modules
- allocator
allocator
Tools for using different allocators with quickjs. - class
classes
JS Class related functionality. - JS Contexts related types.
- Utilites for converting to and from javascript values.
- JS functions and rust callbacks.
- loader
loader
Loaders and resolvers for loading JS modules. - Utility types and traits.
- Types for loading and handling JS modules.
- Module for types dealing with JS objects.
- A group of often used types.
- promise
futures
Utilities for converting promises to futures and vice versa. - Native low-level bindings
- Quickjs runtime related types.
Macros
- async_with
futures
A macro for safely using an asynchronous context while capturing the environment. - class_def
classes
The macro to simplify class definition. - Short macro to define a cstring literal.
- Helper macro to provide module init function. Use for exporting module definitions to be loaded as part of a dynamic library.
Structs
- Rust representation of a javascript object optimized as an array.
- ArrayBuffer
array-buffer
Rust representation of a javascript object of class ArrayBuffer. - An atom is value representing the name of a variable of an objects and can be created from any javascript value.
- Rust representation of a javascript big int.
- ClassId
classes
The type of identifier of class - A javascript instance of Error
- Rust representation of a javascript function.
- A javascript module.
- The placeholder which treated as
null
value - Rust representation of a javascript object.
- The wrapper for JS values to keep it from GC
- Rust representation of a javascript string.
- Rust representation of a javascript symbol.
- TypedArray
array-buffer
Rust representation of a javascript objects of TypedArray classes. - The placeholder which treated as
undefined
value - Any javascript value
Enums
- An error type containing possible thrown exception values.
- Error type of the library.
- The type of Javascript value
Traits
- Extension trait to easily turn results with
Error
into results withCaughtError
- Trait for converting values from atoms.
- For converting javascript values to rust values
- Trait for converting values to atoms.
- For converting rust values to javascript values
- The trait to help break lifetime rules when JS objects leaves current context via
Persistent
wrapper. - Extension trait to easily turn results with
CaughtError
into results withError
Type Definitions
- Result type containing an the javascript exception if there was one.
- Result type used throught the library.