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.

Modules

A marker types for intrinsic

Native low-level bindings

Macros

class_defclasses

The macro to simplify class definition.

The helper macro to impl Loader traits for generic module kind.

Helper macro to provide module init function

Structs

Accessorproperties

The accessor descriptor of a readonly property

Rust representation of a javascript object optimized as an array.

ArrayBufferarray-buffer

Rust representation of a javascript object of class ArrayBuffer.

Asyncfutures

The wrapper for async functons

AsyncStdasync-std

The async_std runtime for spawning executors.

An atom is value representing the name of a variable of an objects and can be created from any javascript value.

The builtin script module loader

The builtin module resolver

The resolver and loader for bundles of compiled modules

Classclasses

The class object interface

ClassIdclasses

The type of identifier of class

The wrapper for values to force coercion

Compileloader

Modules compiling data

The wrapper for constructor function

A single execution context with its own global variables and stack.

Used for building a Context with a specific set of intrinsics

The marker for the module which is created but not loaded yet

Context in use, passed to Context::with.

Eval options.

The marker for the module which is already loaded and evaluated

Executorfutures

The async executor future

An iterator over the items exported out a module

An iterator over the items exported out a module

The file module resolver

The property filter

The wrapper for function to convert is into JS

Rust representation of a javascript function.

The idle awaiting future

The marker for the module which is loaded but not evaluated yet

The wrapper for method functions

Javascript module with certain exports and imports

The builtin native module loader

The wrapper for mutable functions

The marker for the module which is created using ModuleDef

NativeLoaderdyn-load

The native module loader

The placeholder which treated as null value

Rust representation of a javascript object.

The wrapper for once functions

The wrapper to get optional argument from input

The wrapper for JS values to keep it from GC

Promisefutures

Future-aware promise

Promisedfutures

Wrapper for futures to convert to JS promises

Propertyproperties

The data descriptor of a property

RefsMarkerclasses

The helper for QuickJS garbage collector which helps it find internal JS object references.

RegisteryKeyregistery

Key for a registery of a context.

The wrapper the rest arguments from input

Quickjs runtime, entry point of the library.

The allocator which uses Rust global allocator

The marker for the module which is created from text source

The script module loader

Rust representation of a javascript string.

Rust representation of a javascript symbol.

The wrapper to get this from input

Tokiotokio

The tokio async runtime for spawning executors.

TypedArrayarray-buffer

Rust representation of a javascript objects of TypedArray classes.

The placeholder which treated as undefined value

The placeholder which treated as uninitialized JS value

Any javascript value

WithProtoclasses

The prototype setting wrapper

Enums

Error type of the library.

The type of value

Traits

Allocatorallocator

The allocator interface

A helper trait to pass arguments on a function calls.

The trait to wrap rust function to JS directly

AsPropertyproperties

The property interface

ClassDefclasses

The ES6 class definition trait

The trait to spawn execution of pending jobs on async runtime

Trait for converting values from atoms.

The Rust’s FromIterator trait to use with Ctx

For converting javascript values to rust values

The module data which contains bytecode

HasRefsclasses

The helper trait to mark internal JS value refs

Trait for converting values to atoms.

For converting rust values to javascript values

The internal trait to add JS builting

The Rust’s Iterator trait extension which works with Ctx

Loaderloader

Module loader interface

Module definition trait

A trait for using multiple contexts at the same time.

The helper trait to define objects

The trait to help break lifetime rules when JS objects leaves current context via Persistent wrapper.

The marker trait which requires Send when "parallel" feature is used

Resolverloader

Module resolver interface

Type Definitions

The raw module load function (js_module_init)

RawMemPtrallocator

Raw memory pointer

Result type used throught the library.