feat(parser): WASM VT500 scanner with ScanResult SOA dispatch
- 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>
This commit is contained in:
co-authored by
Daniel Imms
parent
936442c813
commit
3eca55a80d
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 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)`);
|
||||
Reference in New Issue
Block a user