[][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;

Modules

context

Structs

Array

Rust representation of a javascript array. Javascript array's are objects and can be used as such. However arrays in quickjs are optimized when they do not have any holes.

ContextBuilder

Used for building a Context with a specific set of intrinsics

Function
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.

Symbol

Enums

Error

Error type of the library

Value

Any javascript value

Traits

FromJs

For converting javascript values to rust values

ToJs

For converting rust values to javascript values

ToJsMulti

For converting multiple of value to javascript

Type Definitions

Result