- Add C WASM scanner emitting structure-of-arrays ops (kinds, starts, lengths, aux, params) - Integrate scan+dispatch in EscapeSequenceParser with async handler resume - Fix CSI fast-path final byte index, ERROR state reporting, and precedingJoinState for REP - Add build pipeline (build_parser_wasm.sh, transition table generator, wasm embed) Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
24 lines
791 B
JavaScript
24 lines
791 B
JavaScript
/**
|
|
* Copyright (c) 2026 The xterm.js authors. All rights reserved.
|
|
* @license MIT
|
|
*/
|
|
|
|
import { readFileSync, writeFileSync } from 'fs';
|
|
import { join, dirname } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const root = join(__dirname, '..');
|
|
const wasm = readFileSync(join(root, 'src/common/parser/wasm/parser.wasm'));
|
|
const b64 = wasm.toString('base64');
|
|
|
|
const out = `/**
|
|
* Copyright (c) 2026 The xterm.js authors. All rights reserved.
|
|
* @license MIT
|
|
*/
|
|
/** Base64-encoded parser.wasm (generated by bin/build_parser_wasm.sh) */
|
|
export const PARSER_WASM_BASE64 = '${b64}';\n`;
|
|
|
|
writeFileSync(join(root, 'src/common/parser/wasm/parser.wasm.embed.ts'), out);
|
|
console.info(`Embedded parser.wasm (${wasm.length} bytes)`);
|