BackendInfo
Which implementation runs the compiler.
Which implementation runs the compiler.
Import#
ts
import type { BackendInfo } from "@shadow-js/compiler";
Signature#
ts
interface BackendInfo {
/**
* `"native"` is the Rust addon, `"wasm"` the same code as WebAssembly, `"javascript"` the TypeScript implementation (chosen when
* `SHADOW_COMPILER_BACKEND=javascript` asks for it, when neither the addon nor the WebAssembly build can be loaded, and always where
* there is no Node.js).
*/
name: "native" | "wasm" | "javascript";
/** The file or package the implementation was loaded from. */
source: string;
/** Why a faster implementation was not used; empty when the first choice loaded. */
notes: readonly string[];
}
Members#
| Name | Type | Description |
|---|---|---|
name |
name: "native" | "wasm" | "javascript" |
"native" is the Rust addon, "wasm" the same code as WebAssembly, "javascript" the TypeScript implementation (chosen when SHADOW_COMPILER_BACKEND=javascript asks for it, when neither the addon nor the WebAssembly build can be loaded, and always where there is no Node.js). |
source |
source: string |
The file or package the implementation was loaded from. |
notes |
notes: readonly string[] |
Why a faster implementation was not used; empty when the first choice loaded. |