Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.2 KiB

# Snapshot File format
This document describes the binary file format of the boa snapshot files.
## Header
The header composes the first part of the snapshot.
| Field | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------ |
| signature `: [u8; 4]` | This is used to quickly check if this file is a snapshot file (`.boa`) |
| guid | Guid generated in compile time and backed into the binary, that is used to check if snapshot is compatibile. |
| checksum | Checksum that is used to check that the snapshot is not corrupted. |
## Internal Reference Map
## JsValue Encoding
type `: u8` (JsValue discriminant, Boolean, Null, etc) followed by the value if it applied for the type (`Null` and `Undefined` does not have a value part).
If following the `JsValue` is an `JsString`, `JsSymbol`, `JsBigInt`, `JsObject` then the
following value will be an index into the appropriate tables.