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
- allocatorallocatorTools for using different allocators with quickjs.
- classclassesJS Class related functionality.
- JS Contexts related types.
- Utilites for converting to and from javascript values.
- JS functions and rust callbacks.
- loaderloaderLoaders 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.
- promisefuturesUtilities for converting promises to futures and vice versa.
- Native low-level bindings
- Quickjs runtime related types.
Macros
- async_withfuturesA macro for safely using an asynchronous context while capturing the environment.
- class_defclassesThe 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.
- ArrayBufferarray-bufferRust 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.
- ClassIdclassesThe type of identifier of class
- A javascript instance of Error
- Rust representation of a javascript function.
- A javascript module.
- The placeholder which treated asnullvalue
- 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.
- TypedArrayarray-bufferRust representation of a javascript objects of TypedArray classes.
- The placeholder which treated asundefinedvalue
- 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 withErrorinto 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 viaPersistentwrapper.
- Extension trait to easily turn results withCaughtErrorinto results withError
Type Definitions
- Result type containing an the javascript exception if there was one.
- Result type used throught the library.