logo

Crate boa

source · []
Expand description

This is an experimental Javascript lexer, parser and compiler written in Rust. Currently, it has support for some of the language.

Crate Features

  • serde - Enables serialization and deserialization of the AST (Abstract Syntax Tree).
  • console - Enables boas WHATWG console object implementation.
  • profiler - Enables profiling with measureme (this is mostly internal).

Modules

This module implements the JavaScript bigint primitive rust type.
Builtins live here, such as Object, String, Math, etc.
Traits and structs for implementing native classes.
Javascript context.
Environment handling, lexical, object, function and declaritive records
Execution of the AST, this is where the interpreter actually runs
This module represents the main way to interact with the garbage collector.
This module implements the Rust representation of a JavaScript object.
A convenience module that re-exports the most commonly-used Boa APIs
This module implements the Property Descriptor.
Conceptually, a realm consists of a set of intrinsic objects, an ECMAScript global environment, all of the ECMAScript code that is loaded within the scope of that global environment, and other associated state and resources.
This module implements the global Symbol object.
Syntactical analysis, such as Abstract Syntax Tree (AST), Parsing and Lexing
This module implements the JavaScript Value.

Structs

Javascript context. It is the primary way to interact with the runtime.
JavaScript bigint primitive rust type.
This represents a JavaScript primitive string.
This represents a JavaScript symbol primitive.

Enums

A Javascript value

Functions

Parses the given source code.

Type Definitions

The result of a Javascript expression is represented like this so it can succeed (Ok) or fail (Err)