[][src]Crate rquickjs

High-level bindings to quickjs

The quickrjs crate provides safe high-level bindings to the quickjs javascript engine. This crate is heavily inspired by the rlua crate.

The Runtime and Context objects

The main entry point of this library is the Runtime struct. It represents the interperter state and is used to create Context objects. As the quickjs library does not support threading the runtime is locked behind a mutex. Multiple threads cannot run as script or create objects from the same runtime at the same time. The Context object represents a global environment and a stack. Contexts of the same runtime can share javascript objects like in browser between frames of the same origin.

Re-exports

pub use context::Context;
pub use context::Ctx;
pub use context::Globals;

Modules

context

Structs

Array

Rust representation of a javascript array.

ContextBuilder

Used for building a Context with a specific set of intrinsics

Module

A module with certain exports and imports

Object

Rust representation of a javascript object.

Runtime

Entry point of the library.

String

Rust representation of a javascript string.

Enums

Error
Value

Any javascript value

Traits

FromJs

For converting javascript values to rust values

ToJs

For converting rust values to javascript values

Type Definitions

Result