From 92905a5bc9064371fd9140023fceb1249a4ee5b6 Mon Sep 17 00:00:00 2001 From: Chris Harvey <1362083+chharvey@users.noreply.github.com> Date: Thu, 18 Jun 2026 20:45:00 -0400 Subject: [PATCH 1/4] build: initialize core files --- .gitignore | 7 +- ts/.editorconfig | 16 + ts/.gitignore | 8 + ts/README.md | 176 ++++ ts/eslint.config.js | 172 ++++ ts/package-lock.json | 2065 ++++++++++++++++++++++++++++++++++++++++++ ts/package.json | 63 ++ ts/src/binaryen.ts | 1 + ts/tsconfig.json | 28 + ts/typedoc.config.js | 23 + 10 files changed, 2557 insertions(+), 2 deletions(-) create mode 100644 ts/.editorconfig create mode 100644 ts/.gitignore create mode 100644 ts/README.md create mode 100644 ts/eslint.config.js create mode 100644 ts/package-lock.json create mode 100644 ts/package.json create mode 100644 ts/src/binaryen.ts create mode 100644 ts/tsconfig.json create mode 100644 ts/typedoc.config.js diff --git a/.gitignore b/.gitignore index b88109b38e0..3265d12718e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ options-pinned.h # Files generated by test suite and fuzzer /out/ +# generated documentation +docs/ + # files related to building in-tree CMakeFiles *.cmake @@ -50,8 +53,8 @@ CMakeUserPresets.json .DS_Store # files related to VSCode -/.history -/.vscode +.history/ +.vscode/ # Generated by VSCode CMake extension /Testing diff --git a/ts/.editorconfig b/ts/.editorconfig new file mode 100644 index 00000000000..b5cca5a493c --- /dev/null +++ b/ts/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig: https://EditorConfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = tab +indent_style = tab +insert_final_newline = true +max_line_length = off +trim_trailing_whitespace = true + +[**/*.json] +indent_size = 2 +indent_style = space diff --git a/ts/.gitignore b/ts/.gitignore new file mode 100644 index 00000000000..c497ac9cba5 --- /dev/null +++ b/ts/.gitignore @@ -0,0 +1,8 @@ +# dependency directories +node_modules/ + +# built files +build/ + +# compiled TypeScript +dist/ diff --git a/ts/README.md b/ts/README.md new file mode 100644 index 00000000000..7e30757f5c7 --- /dev/null +++ b/ts/README.md @@ -0,0 +1,176 @@ +# Binaryen.TS +Binaryen API ported to TypeScript for use in the browser and in Node.JS. + +## How To Use +```zsh +$ npm install binaryen.ts +``` +```ts +import * as binaryen from "binaryen.ts"; + +const mod: binaryen.Module = new binaryen.Module(); + +mod.functions.add("add", binaryen.createType([binaryen.i32, binaryen.i32]), binaryen.i32, [binaryen.i32], (() => { + const {block, local, i32} = mod.wasm; + const param0: binaryen.ExpressionRef = local.get(0, binaryen.i32); + const param1: binaryen.ExpressionRef = local.get(1, binaryen.i32); + const result: binaryen.ExpressionRef = i32.add(param0, param1); + return block(null, [ + local.set(2, result), + local.get(2, binaryen.i32), + ], binaryen.i32); +})()); +mod.exports.addFunction("add", "add"); +mod.optimize(); +if (!mod.validate()) { + throw new Error("Invalid WebAssembly module."); +} + +const textData = mod.emitText(); +const wasmData = mod.emitBinary() as Uint8Array; +const compiled = new WebAssembly.Module(wasmData); +const instance = new WebAssembly.Instance(compiled, {}); + +console.log(instance.exports.add(41, 1)); // 42 +``` + +## How to Contribute +Contributions are welcome! +Make sure you have [Git](https://git-scm.com/) and [Node (and NPM)](https://nodejs.org/) installed on your machine, +and have already cloned the **WebAssembly/binaryen** repo. + +From the repo’s root: +```zsh +$ cd ./ts/ +$ npm ci +$ npm run prepublishOnly # gets the package in working order +``` + +### Pipeline +#### Set Up the Emscripten Build +You’ll need to do this whenever pulling changes from the C++ repo. +```zsh +$ npm run make # emits Emscripten builds to ./build/ +``` + +#### Develop in TypeScript +The core of this project is written in [TS](https://www.typescriptlang.org/), best paired with a powerful editor and some nice extensions. +```zsh +$ npm run compile # emits javascript output to ./dist/ +``` +Don’t put anything important in `./dist/`, as it gets deleted and rebuilt each time. + +Before committing, ensure only the best code quality by running [ESLint](https://eslint.org/). +```zsh +$ npm run lint # reports linter errors & warnings +$ npm run lint -- --fix # tries to auto-fix problems (some may need manual fixing) +``` + +Use [Conventional Commits](https://www.conventionalcommits.org/) commit message format. +Messages should be in the present tense / command tense. +```zsh +$ git commit -m "feat: add a new feature" +$ git commit -m "feat!: add a new breaking feature" # API consumers need to know about these +$ git commit -m "fix: fix a bug" +$ git commit -m "refactor: reorganize code" +$ git commit -m "lint: fix a coding style issue" +$ git commit -m "docs: update documentation" +$ git commit -m "test: add/update tests" +$ git commit -m "build: make a change related to the package build system" +``` + +#### Update Docs +Generated documentation is built with [TypeDoc](https://typedoc.org/), a tool that parses comments in the TS source files and produces beautiful HTML. + +After developing and updating doc-comments, regenerate docs and view them locally in your browser. +```zsh +$ npm run docs # builds a static site to ../docs/binaryen.ts/ +$ open ../docs/binaryen.ts/index.html +``` +Don’t put anything important in `../docs/`. + +Documentation is hosted online via GitHub Pages at , +and will be moved to once this fork is merged in. + +Upon every release, public docs should be redeployed via updating the `gh-pages` branch. On that branch, the `../docs/` folder is checked in. +You need to switch to that branch, merge in your changes, rebuild the docs, then commit and push. +```zsh +$ git switch gh-pages +$ git merge --no-commit main +$ npm run docs +$ git add ../docs/binaryen.ts/ +$ git merge --continue +$ git push +``` + +#### Run Tests +The test suite is still in progress, migrating from `../test/binaryen.js/`. +The new test suite uses the Node v22+ test runner. +```zsh +$ npm run test +``` + +#### Bundle +TypeScript only compiles the source files to `./dist/`. +After that we may need a bundler to optimize and minify it into a prepackaged file, +which will be able to target different platforms so that it can be used by consumers. + +TODO: more details + +#### Build and Push +Before pushing, rebuild the entire project to catch any errors. +```zsh +$ npm run build + +# if all goes well… + +$ git push +``` + +#### Publish +TODO: this section + +### File Inventory +- `README.md`: *you are here* + +- `.editorconfig`, `.gitignore`: standard repo files + +- `package{,-lock}.json`: Node package & npm registry details + +- `node_modules/` *(gitignored)*: npm dependencies + +- `tsconfig.json`: TypeScript configuration + +- `eslint.config.js`: JS/TS coding style conventions + +- `typedoc.config.js`: documentation generator configuration + +- `build/` *(gitignored)*: output of **Emscripten**; this is imported by the `src/` library + +- `src/`: human-written source code + + - `binaryen.ts`: the entrypoint; exports everything available to consumers + + - `-pre.ts`: artifacts provided by Emscripten + + - `-utils.ts`: internal tools + + - `{constants,globals}.ts`: top-level exported globals + + - `-deprecations.ts`: everything deprecated, all in one place + + - `classes/`: all the modular code + + - `{TypeBuilder,ExpressionRunner,Relooper}.ts`: Binaryen tools + + - `module/`: Module and related classes + + - `expression/`: Expression info classes, and source for WASM expression generation + + - `services/`: namespace-like, stateless classes + +- `dist/` *(gitignored)*: output of **tsc**; this gets bundled and published to NPM for consumers + +- `docs/`: documentation assets + +- `../docs/binaryen.ts/` *(gitignored)*: output of **typedoc**; hosted online diff --git a/ts/eslint.config.js b/ts/eslint.config.js new file mode 100644 index 00000000000..43680d20adf --- /dev/null +++ b/ts/eslint.config.js @@ -0,0 +1,172 @@ +import eslint from "@eslint/js"; +import stylistic from "@stylistic/eslint-plugin"; +import globals from "globals"; +import tseslint from "typescript-eslint"; + + + +export default [ + {ignores: ["./build/", "./dist/", "./docs/"]}, + + eslint.configs.recommended, // https://github.com/eslint/eslint/blob/v10.2.1/packages/js/src/configs/eslint-recommended.js + { + name: "All", // all JS and TS files + files: ["./{eslint,typedoc}.config.js", "./{src,test}/**/*.{js,ts}"], + languageOptions: {globals: {...globals.node}}, + linterOptions: {reportUnusedDisableDirectives: "error"}, + plugins: {"@stylistic": stylistic}, + + rules: { + /* # File Conventions (should be consistent with `/.editorconfig` file) */ + "@stylistic/eol-last": "error", + "@stylistic/linebreak-style": "error", + "@stylistic/no-trailing-spaces": "error", + + /* # Layout & Formatting */ + /* ## Indentation, Spacing, and Alignment */ + "@stylistic/arrow-spacing": "error", + "@stylistic/block-spacing": "error", + "@stylistic/comma-spacing": "error", + "@stylistic/dot-location": ["error", "property"], + "@stylistic/function-call-spacing": "error", + "@stylistic/indent": ["error", "tab", { + SwitchCase: 1, + flatTernaryExpressions: true, + }], + "@stylistic/key-spacing": "error", + "@stylistic/keyword-spacing": "error", + "@stylistic/no-mixed-spaces-and-tabs": "error", + "@stylistic/semi-spacing": "error", + "@stylistic/space-before-blocks": "error", + "@stylistic/space-before-function-paren": ["error", {named: "never"}], + "@stylistic/space-infix-ops": "error", + "@stylistic/space-unary-ops": "error", + "@stylistic/spaced-comment": "error", + "@stylistic/type-annotation-spacing": "error", + + /* ## Grouping Structure Style */ + "@stylistic/array-bracket-newline": ["error", "consistent"], + "@stylistic/array-bracket-spacing": "error", + "@stylistic/array-element-newline": ["error", "consistent"], + "arrow-body-style": "error", + "@stylistic/brace-style": ["error", "1tbs", {allowSingleLine: true}], + "@stylistic/computed-property-spacing": "error", + curly: "error", + "@stylistic/function-call-argument-newline": ["error", "consistent"], + "@stylistic/function-paren-newline": "error", + "func-style": ["error", "declaration", {allowArrowFunctions: true}], + "@stylistic/lines-between-class-members": ["error", "always", {exceptAfterSingleLine: true}], + "@stylistic/member-delimiter-style": ["error", { + overrides: { + interface: {singleline: {requireLast: true}}, + typeLiteral: { + multiline: {delimiter: "comma"}, + singleline: {delimiter: "comma"}, + }, + }, + }], + "no-useless-computed-key": "error", + "@stylistic/object-curly-newline": ["error", { + ObjectExpression: {multiline: true}, + ObjectPattern: {multiline: true}, + ImportDeclaration: "always", + ExportDeclaration: {multiline: true}, + TSTypeLiteral: {multiline: true}, + TSInterfaceBody: "always", + TSEnumBody: "always", + }], + "@stylistic/object-curly-spacing": "error", + "@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}], + "object-shorthand": ["error", "properties", {avoidQuotes: true}], + "@stylistic/padded-blocks": ["error", "never"], + "@stylistic/quote-props": ["error", "as-needed"], + "@stylistic/space-in-parens": "error", + + /* ## Operator Style */ + "@stylistic/arrow-parens": "error", + "@stylistic/comma-dangle": ["error", "always-multiline"], + "@stylistic/comma-style": "error", + "dot-notation": "error", + "@stylistic/implicit-arrow-linebreak": "error", + "@stylistic/new-parens": "error", + "@stylistic/quotes": "error", + "@stylistic/semi": "error", + "@stylistic/semi-style": "error", + "@stylistic/wrap-iife": ["error", "inside", {functionPrototypeMethods: true}], + + /* # Best Practices */ + /* ## Preferred Operators & Methods */ + eqeqeq: "error", + "no-lonely-if": "error", + "no-unneeded-ternary": ["error", {defaultAssignment: false}], + "no-useless-concat": "error", + "operator-assignment": "error", + "prefer-object-spread": "error", + "prefer-template": "error", + + /* ## Variable Declarations */ + "no-shadow": "error", + "no-use-before-define": "error", + "one-var": ["error", "never"], + "prefer-const": "error", + + /* ## Function & Module Design */ + "default-param-last": "error", + "func-names": ["error", "never"], + "prefer-arrow-callback": ["error", {allowUnboundThis: false}], + }, + }, + { + ...tseslint.configs.eslintRecommended, // https://github.com/typescript-eslint/typescript-eslint/blob/v8.59.1/packages/eslint-plugin/src/configs/flat/eslint-recommended.ts + files: ["./{src,test}/**/*.ts"], + }, + { + name: "TypeScript Only", // rules that break on JS files, and rules that need TSConfig to work + files: ["./{src,test}/**/*.ts"], + languageOptions: { + globals: {...globals.node}, + parser: tseslint.parser, + parserOptions: {project: ["./tsconfig.json", "./test/tsconfig.json"]}, + }, + plugins: {"@typescript-eslint": tseslint.plugin}, + + rules: { + "@typescript-eslint/ban-ts-comment": ["error", {"ts-expect-error": false}], + + /* # Layout & Formatting */ + /* ## Operator Style */ + "@typescript-eslint/array-type": ["error", { + default: "array-simple", + readonly: "array", + }], + "dot-notation": "off", + "@typescript-eslint/dot-notation": "error", + "@typescript-eslint/no-unnecessary-condition": "error", + + /* # Best Practices */ + /* ## Variable Declarations */ + "no-shadow": "off", + "@typescript-eslint/no-shadow": "error", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": ["error", { + argsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + ignoreRestSiblings: true, + reportUsedIgnorePattern: true, + }], + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": "error", + + /* ## Function & Module Design */ + "@typescript-eslint/consistent-type-imports": "error", + "default-param-last": "off", + "@typescript-eslint/default-param-last": "error", + "@typescript-eslint/no-import-type-side-effects": "error", + + /* ## Strictness */ + "@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}], + "@typescript-eslint/no-deprecated": "warn", + "@typescript-eslint/prefer-readonly": "error", + }, + }, +]; diff --git a/ts/package-lock.json b/ts/package-lock.json new file mode 100644 index 00000000000..1b53e83fdc7 --- /dev/null +++ b/ts/package-lock.json @@ -0,0 +1,2065 @@ +{ + "name": "binaryen.ts", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "binaryen.ts", + "version": "0.1.0", + "license": "Apache-2.0", + "devDependencies": { + "@eslint/js": "^10.0.1", + "@stylistic/eslint-plugin": "^5.10.0", + "@types/node": "^25.8.0 || ^26", + "eslint": "^10.2.1", + "globals": "^17.5.0", + "tsx": "^4.21.0", + "typedoc": "^0.28.19", + "typescript": "~6.0.0", + "typescript-eslint": "^8.59.1" + }, + "engines": { + "node": "^20 || ^22 || ^24 || ^26" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.6.0.tgz", + "integrity": "sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz", + "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@gerrit0/mini-shiki": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", + "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/engine-oniguruma": "^3.23.0", + "@shikijs/langs": "^3.23.0", + "@shikijs/themes": "^3.23.0", + "@shikijs/types": "^3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@shikijs/langs": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/themes": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/types": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.10.0.tgz", + "integrity": "sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/types": "^8.56.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^9.0.0 || ^10.0.0" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.8.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.8.0.tgz", + "integrity": "sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.3.tgz", + "integrity": "sha512-PwFvSKsXGShKGW6n5bZOhGHEcCZXM8HofLK9fNsEwZXzFRjoY+XT1Vsf1zgyXdwTr0ZYz1/2tkZ0DBTT9jZjhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.59.3", + "@typescript-eslint/type-utils": "8.59.3", + "@typescript-eslint/utils": "8.59.3", + "@typescript-eslint/visitor-keys": "8.59.3", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.59.3", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.3.tgz", + "integrity": "sha512-HPwA+hVkfcriajbNvTmZv4VRauibay+cWArYUYq7u7W7PmGShMxbPxLvrwDme55a6d5alG3nrYfhyJ/G28XlLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.59.3", + "@typescript-eslint/types": "8.59.3", + "@typescript-eslint/typescript-estree": "8.59.3", + "@typescript-eslint/visitor-keys": "8.59.3", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.3.tgz", + "integrity": "sha512-ECiUWa/KYRGDFUqTNehaRgzDshnJfkTABJxVemHk4ko22gcr0ukloKjWvyQ64g8YCV/UI47kN1dbmjf/GaQYng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.59.3", + "@typescript-eslint/types": "^8.59.3", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.3.tgz", + "integrity": "sha512-t2LvZnoEfzKtnPjgeEu41xw5gxq9mQVfYy4OoZ4Vlt0sk3JwxmhCca/AR7DwOiHrjWgjAj6as4AhRLKSDfvZIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.3", + "@typescript-eslint/visitor-keys": "8.59.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.3.tgz", + "integrity": "sha512-PcIJHjmaREXLgIAIzLnSY9VucEzz8FKXsRgFa1DmdGCK/5tJpW03TKJF01Q6VZd1lLdz2sIKPWaDUZN9dp//dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.3.tgz", + "integrity": "sha512-g71d8QD8UaiHGvrJwyIS1hCX5r63w6Jll+4VEYhEAHXTDIqX1JgxhTAbEHtKntL9kuc4jRo7/GWw5xfCepSccQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.3", + "@typescript-eslint/typescript-estree": "8.59.3", + "@typescript-eslint/utils": "8.59.3", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.3.tgz", + "integrity": "sha512-ePFoH0g4ludssdRFqqDxQePCxU4WQyRa9+XVwjm7yLn0FKhMeoetC+qBEEI1Eyb1pGSDveTIT09Bvw2WhlGayg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.3.tgz", + "integrity": "sha512-CbRjVRAf7Lr9Kr8RopKcbY45p2VfmmHrm0ygOCYFi7oU8q19m0Fs/6iHS7kNOmwpp+ob07ZVcAqlxUod9lYdmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.59.3", + "@typescript-eslint/tsconfig-utils": "8.59.3", + "@typescript-eslint/types": "8.59.3", + "@typescript-eslint/visitor-keys": "8.59.3", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.3.tgz", + "integrity": "sha512-JAvT14goBzRzzzZyqq3P9BLArIxTtQURUtFgQ/V7FO+eU+Gg6ES+5ymOPP1wRxXcxAYeivCk4uS3jCKWI1K8Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.59.3", + "@typescript-eslint/types": "8.59.3", + "@typescript-eslint/typescript-estree": "8.59.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.3.tgz", + "integrity": "sha512-f1UQF7ggd42YiwI5wGrRaPsa+P0CINBlrkLPmGfpq/u/I/oVtecoEIfFR9ag/oa1sLOsRNZ6xehf6qMZhQGBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.59.3", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.4.0.tgz", + "integrity": "sha512-loXy6bWOoP3EP6JA7jo6p5jMpBJmHmsNZM5SFRHLdh1MGOPurMnNBj4ZlAbaqUAaQWbCr7jHV4P7gzAyryZWkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.6.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", + "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/markdown-it": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/semver": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", + "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.0.tgz", + "integrity": "sha512-8ccZMPD69s1AbKXx0C5ddTNZfNjwV04iIKgjZmKfKxMynEtSYcK0Lh7iQFh53fI5Yu4pb9usgAiqyPmEONaALg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typedoc": { + "version": "0.28.19", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.19.tgz", + "integrity": "sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@gerrit0/mini-shiki": "^3.23.0", + "lunr": "^2.3.9", + "markdown-it": "^14.1.1", + "minimatch": "^10.2.5", + "yaml": "^2.8.3" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18", + "pnpm": ">= 10" + }, + "peerDependencies": { + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.59.3", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.3.tgz", + "integrity": "sha512-KgusgyDgG4LI8Ih/sWaCtZ06tckLAS5CvT5A4D1Q7bYVoAAyzwiZvE4BmwDHkhRVkvhRBepKeASoFzQetha7Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.59.3", + "@typescript-eslint/parser": "8.59.3", + "@typescript-eslint/typescript-estree": "8.59.3", + "@typescript-eslint/utils": "8.59.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/ts/package.json b/ts/package.json new file mode 100644 index 00000000000..b98a0062a0c --- /dev/null +++ b/ts/package.json @@ -0,0 +1,63 @@ +{ + "name": "binaryen.ts", + "description": "Browser & Node.js builds of Binaryen, a compiler infrastructure and toolchain library for WebAssembly.", + "version": "0.1.0", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "git+https://github.com/WebAssembly/binaryen.git" + }, + "keywords": [ + "webassembly", + "wasm", + "typescript", + "javascript" + ], + "type": "module", + "main": "./dist/binaryen.js", + "scripts": { + "make": "rm -rf ../build/ && emcmake cmake -S ../ -B ../build/ && emmake make -C ../build/ binaryen_js", + "postmake": "rm -rf ./build/ && mkdir -p ./build/ && cp -R ../build/bin/ ./build/", + "check": "../check.py binaryenjs --binaryen-bin='../build/bin'", + "compile": "rm -rf ./dist/ && tsc && tsc --project ./test/tsconfig.json", + "lint": "eslint ./", + "docs": "rm -rf ../docs/binaryen.ts/ && typedoc", + "test": "tsx --test -- './test/**/*.test.ts'", + "test:only": "tsx --test --test-only -- './test/**/*.test.ts'", + "build": "npm run compile && npm run lint && npm run docs && npm run test", + "prepublishOnly": "npm run make && npm run check && npm run build" + }, + "files": [ + "./build/", + "./dist/" + ], + "imports": { + "#binaryen-raw": { + "types": "./src/types/binaryen_js.d.ts", + "default": "./build/binaryen_js.js" + } + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@stylistic/eslint-plugin": "^5.10.0", + "@types/node": "^25.8.0 || ^26", + "eslint": "^10.2.1", + "globals": "^17.5.0", + "tsx": "^4.21.0", + "typedoc": "^0.28.19", + "typescript": "~6.0.0", + "typescript-eslint": "^8.59.1" + }, + "engines": { + "node": "^20 || ^22 || ^24 || ^26" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": "^22 || ^24 || ^26" + }, + "packageManager": { + "name": "npm" + } + } +} diff --git a/ts/src/binaryen.ts b/ts/src/binaryen.ts new file mode 100644 index 00000000000..cb0ff5c3b54 --- /dev/null +++ b/ts/src/binaryen.ts @@ -0,0 +1 @@ +export {}; diff --git a/ts/tsconfig.json b/ts/tsconfig.json new file mode 100644 index 00000000000..b6f7d9edb29 --- /dev/null +++ b/ts/tsconfig.json @@ -0,0 +1,28 @@ +{ + // TSConfig: https://www.typescriptlang.org/tsconfig/ + "compilerOptions": { + // Type Checking + "exactOptionalPropertyTypes": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + + // Modules + "module": "esnext", + "rewriteRelativeImportExtensions": true, + "rootDir": "./src/", + + // Emit + "declaration": true, + "outDir": "./dist/", + + // Interop Constraints + "verbatimModuleSyntax": true, + + // Completeness + "skipLibCheck": true, + }, + "include": [ + "./src/" + ], +} diff --git a/ts/typedoc.config.js b/ts/typedoc.config.js new file mode 100644 index 00000000000..877ce548b5a --- /dev/null +++ b/ts/typedoc.config.js @@ -0,0 +1,23 @@ +export default { + name: "Binaryen.TS", + entryPoints: ["./src/binaryen.ts"], + projectDocuments: ["./docs/API-Overview.md"], + useFirstParagraphOfCommentAsSummary: true, + includeVersion: true, + gitRevision: "gh-pages", + out: "../docs/binaryen.ts/", + githubPages: false, // when `false`, does not generate a `.nojekyll` file to prevent GitHub Pages from using Jekyll + customCss: "./docs/styles.css", + + intentionallyNotExported: [ + "Tag", + "Global", + "Memory", + "Table", + "BinaryenFunction", + "DataSegment", + "ElementSegment", + "Import", + "Export", + ], +}; From 28c2daffa94a9daa7f954d51568662dd0ecce2b5 Mon Sep 17 00:00:00 2001 From: Chris Harvey <1362083+chharvey@users.noreply.github.com> Date: Thu, 18 Jun 2026 20:59:58 -0400 Subject: [PATCH 2/4] feat: update Emscripten build && test internals --- CMakeLists.txt | 2 +- ts/src/-pre.ts | 30 +++++++++++++++++++++++++ ts/src/types/binaryen_js.d.ts | 42 +++++++++++++++++++++++++++++++++++ ts/test/binaryen.test.ts | 29 ++++++++++++++++++++++++ ts/test/tsconfig.json | 17 ++++++++++++++ 5 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 ts/src/-pre.ts create mode 100644 ts/src/types/binaryen_js.d.ts create mode 100644 ts/test/binaryen.test.ts create mode 100644 ts/test/tsconfig.json diff --git a/CMakeLists.txt b/CMakeLists.txt index fb4bb241a77..1865f4db52a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -557,7 +557,7 @@ if(EMSCRIPTEN) else() target_link_libraries(binaryen_js PRIVATE "-sEXPORT_ES6") endif() - target_link_libraries(binaryen_js PRIVATE "-sEXPORTED_RUNTIME_METHODS=stringToUTF8OnStack,stringToAscii,getExceptionMessage") + target_link_libraries(binaryen_js PRIVATE "-sEXPORTED_RUNTIME_METHODS=out,err,HEAP8,HEAPU8,HEAP32,HEAPU32,stackSave,stackRestore,stackAlloc,UTF8ToString,stringToAscii,stringToUTF8OnStack,getExceptionMessage") target_link_libraries(binaryen_js PRIVATE "-sEXPORTED_FUNCTIONS=_malloc,_free,__i32_load") target_link_libraries(binaryen_js PRIVATE "--post-js=${CMAKE_CURRENT_SOURCE_DIR}/src/js/binaryen.js-post.js") target_link_libraries(binaryen_js PRIVATE optimized "--closure=1") diff --git a/ts/src/-pre.ts b/ts/src/-pre.ts new file mode 100644 index 00000000000..551250ab9ce --- /dev/null +++ b/ts/src/-pre.ts @@ -0,0 +1,30 @@ +// # Preprocess # // +import Binaryen from "#binaryen-raw"; + + + +/** The main object provided by Emscripten. This is what gets wrapped. It is not exposed to the consumer. */ +export const BinaryenObj = await Binaryen({ + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + print: (...args: readonly any[]): void => console?.log?.(...args), + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + printWarn: (...args: readonly any[]): void => (console?.warn ?? console?.log)?.(...args), + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + printErr: (...args: readonly any[]): void => (console?.error ?? console?.log)?.(...args), +}); + + + +export const { + _malloc, + _free, + out, + err, + stackSave, + stackRestore, + stackAlloc, + UTF8ToString, + stringToAscii, + stringToUTF8OnStack, + getExceptionMessage, +} = BinaryenObj; diff --git a/ts/src/types/binaryen_js.d.ts b/ts/src/types/binaryen_js.d.ts new file mode 100644 index 00000000000..84d939482d1 --- /dev/null +++ b/ts/src/types/binaryen_js.d.ts @@ -0,0 +1,42 @@ +// Artifacts provided by the Emscripten build, located at `./build/binaryen_js.js`. + + + +declare module "#binaryen-raw" { + interface BinaryenObjType { + // Standard C functions listed in `EXPORTED_FUNCTIONS`. + // https://github.com/emscripten-core/emscripten/blob/main/src/preamble.js + _malloc(ptr: number): number; + _free(ptr: number): void; + + + // Helper tools defined in Emscripten’s codebase needed in TS. Listed in `EXPORTED_RUNTIME_METHODS`. + // https://github.com/emscripten-core/emscripten/blob/main/src/shell_minimal.js + out(x: unknown): void; // alias of `console.log` + err(x: unknown): void; // alias of `console.error` + + // https://github.com/emscripten-core/emscripten/blob/main/src/lib/libcore.js + readonly HEAP8: Int8Array; + readonly HEAPU8: Uint8Array; + readonly HEAP32: Int32Array; + readonly HEAPU32: Uint32Array; + stackSave(): number; + stackRestore(stack: number): number; + stackAlloc(length: number): number; + + // https://github.com/emscripten-core/emscripten/blob/main/src/lib/libstrings.js + UTF8ToString(n: number): string; + stringToAscii(text: string, buffer: number): void; + stringToUTF8OnStack(str: string): number; + + // https://github.com/emscripten-core/emscripten/blob/main/src/lib/libexceptions.js + getExceptionMessage(e: number | Error | object): [string, string]; + + + // Binaryen’s functions in the C++ codebase, e.g. `_BinaryenTypeUnreachable`. + // These are exposed via `-sEXPORT_NAME=Binaryen` in the makelists. + [key: string]: (...args: readonly (number | bigint | boolean)[]) => number; + } + + export default function Binaryen(moduleArg?: T): Promise; +} diff --git a/ts/test/binaryen.test.ts b/ts/test/binaryen.test.ts new file mode 100644 index 00000000000..658a3b45914 --- /dev/null +++ b/ts/test/binaryen.test.ts @@ -0,0 +1,29 @@ +import * as assert from "node:assert"; +import { + suite, + test, +} from "node:test"; + + + +suite("binaryen", () => { + test("[internal] Emscripten artifacts and module arguments exist.", async () => { + const __pre = await import("../src/-pre.ts"); + assert.ok(__pre.BinaryenObj); + assert.ok(__pre._malloc); + assert.ok(__pre._free); + assert.ok(__pre.out); + assert.ok(__pre.err); + assert.ok(__pre.stackSave); + assert.ok(__pre.stackRestore); + assert.ok(__pre.stackAlloc); + assert.ok(__pre.UTF8ToString); + assert.ok(__pre.stringToAscii); + assert.ok(__pre.stringToUTF8OnStack); + assert.ok(__pre.getExceptionMessage); + + assert.ok(__pre.BinaryenObj.print); + assert.ok(__pre.BinaryenObj.printWarn); + assert.ok(__pre.BinaryenObj.printErr); + }); +}); diff --git a/ts/test/tsconfig.json b/ts/test/tsconfig.json new file mode 100644 index 00000000000..f43565f788a --- /dev/null +++ b/ts/test/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + // Modules + "module": "nodenext", + "rootDir": "../", + "types": [ + "node" + ], + + // Emit + "noEmit": true, + }, + "include": [ + "./" + ], +} From 0f8660d0a0ab62610549919c8271754bbc923fb4 Mon Sep 17 00:00:00 2001 From: Chris Harvey <1362083+chharvey@users.noreply.github.com> Date: Thu, 18 Jun 2026 21:15:13 -0400 Subject: [PATCH 3/4] feat: add constants & enums --- ts/src/-deprecations.ts | 19 + ts/src/binaryen.ts | 5 +- ts/src/classes/ExpressionRunner.ts | 10 + ts/src/classes/module/Module.ts | 37 ++ ts/src/constants.ts | 751 +++++++++++++++++++++++++++++ ts/test/binaryen.test.ts | 302 ++++++++++++ 6 files changed, 1123 insertions(+), 1 deletion(-) create mode 100644 ts/src/-deprecations.ts create mode 100644 ts/src/classes/ExpressionRunner.ts create mode 100644 ts/src/classes/module/Module.ts create mode 100644 ts/src/constants.ts diff --git a/ts/src/-deprecations.ts b/ts/src/-deprecations.ts new file mode 100644 index 00000000000..d1b6a980391 --- /dev/null +++ b/ts/src/-deprecations.ts @@ -0,0 +1,19 @@ +import { + Feature, +} from "./classes/module/Module.ts"; +import { + ExpressionId, + ExternalKind, + SideEffect, +} from "./constants.ts"; + + + +/** @deprecated The `ExpressionIds` enum has been renamed to {@link ExpressionId}. */ +export const ExpressionIds = ExpressionId; +/** @deprecated The `SideEffects` enum has been renamed to {@link SideEffect}. */ +export const SideEffects = SideEffect; +/** @deprecated The `ExternalKinds` enum has been renamed to {@link ExternalKind}. */ +export const ExternalKinds = ExternalKind; +/** @deprecated The `Features` enum has been renamed to {@link Feature}. */ +export const Features = Feature; diff --git a/ts/src/binaryen.ts b/ts/src/binaryen.ts index cb0ff5c3b54..b6d28a1375b 100644 --- a/ts/src/binaryen.ts +++ b/ts/src/binaryen.ts @@ -1 +1,4 @@ -export {}; +/** @module binaryen.ts */ +export * from "./constants.ts"; +export {Feature} from "./classes/module/Module.ts"; +export {ExpressionRunnerFlag} from "./classes/ExpressionRunner.ts"; diff --git a/ts/src/classes/ExpressionRunner.ts b/ts/src/classes/ExpressionRunner.ts new file mode 100644 index 00000000000..af296abe3fb --- /dev/null +++ b/ts/src/classes/ExpressionRunner.ts @@ -0,0 +1,10 @@ +import { + BinaryenObj, +} from "../-pre.ts"; + + + +export enum ExpressionRunnerFlag { + Default = BinaryenObj["_ExpressionRunnerFlagsDefault"](), + PreserveSideeffects = BinaryenObj["_ExpressionRunnerFlagsPreserveSideeffects"](), +} diff --git a/ts/src/classes/module/Module.ts b/ts/src/classes/module/Module.ts new file mode 100644 index 00000000000..25855c0e1e3 --- /dev/null +++ b/ts/src/classes/module/Module.ts @@ -0,0 +1,37 @@ +import { + BinaryenObj, +} from "../../-pre.ts"; + + + +export enum Feature { + MVP = BinaryenObj["_BinaryenFeatureMVP"](), + Atomics = BinaryenObj["_BinaryenFeatureAtomics"](), + MutableGlobals = BinaryenObj["_BinaryenFeatureMutableGlobals"](), + NontrappingFPToInt = BinaryenObj["_BinaryenFeatureNontrappingFPToInt"](), + SIMD128 = BinaryenObj["_BinaryenFeatureSIMD128"](), + BulkMemory = BinaryenObj["_BinaryenFeatureBulkMemory"](), + SignExt = BinaryenObj["_BinaryenFeatureSignExt"](), + ExceptionHandling = BinaryenObj["_BinaryenFeatureExceptionHandling"](), + TailCall = BinaryenObj["_BinaryenFeatureTailCall"](), + ReferenceTypes = BinaryenObj["_BinaryenFeatureReferenceTypes"](), + Multivalue = BinaryenObj["_BinaryenFeatureMultivalue"](), + GC = BinaryenObj["_BinaryenFeatureGC"](), + Memory64 = BinaryenObj["_BinaryenFeatureMemory64"](), + RelaxedSIMD = BinaryenObj["_BinaryenFeatureRelaxedSIMD"](), + ExtendedConst = BinaryenObj["_BinaryenFeatureExtendedConst"](), + Strings = BinaryenObj["_BinaryenFeatureStrings"](), + MultiMemory = BinaryenObj["_BinaryenFeatureMultiMemory"](), + StackSwitching = BinaryenObj["_BinaryenFeatureStackSwitching"](), + SharedEverything = BinaryenObj["_BinaryenFeatureSharedEverything"](), + FP16 = BinaryenObj["_BinaryenFeatureFP16"](), + BulkMemoryOpt = BinaryenObj["_BinaryenFeatureBulkMemoryOpt"](), + CallIndirectOverlong = BinaryenObj["_BinaryenFeatureCallIndirectOverlong"](), + // TODO: CustomDescriptors + RelaxedAtomics = BinaryenObj["_BinaryenFeatureRelaxedAtomics"](), + CustomPageSizes = BinaryenObj["_BinaryenFeatureCustomPageSizes"](), + // TODO: Multibyte + WideArithmetic = BinaryenObj["_BinaryenFeatureWideArithmetic"](), + CompactImports = BinaryenObj["_BinaryenFeatureCompactImports"](), + All = BinaryenObj["_BinaryenFeatureAll"](), +} diff --git a/ts/src/constants.ts b/ts/src/constants.ts new file mode 100644 index 00000000000..157d1c4de34 --- /dev/null +++ b/ts/src/constants.ts @@ -0,0 +1,751 @@ +// # Expressions, Types, and Constants # // +// Compile-time types used by TypeScript, Binaryen types, expression types, and other enums. + + + +import { + BinaryenObj, +} from "./-pre.ts"; + + + +// ## Static Types ## // +// ### Expressions ### // +export type Type = number; +export type HeapType = number; +export type PackedType = number; +export type ExpressionRef = number; + +// ### Module Components ### // +/** Reference to a {@link Module}. */ +export type ModuleRef = number; +/** Reference to a {@link Module.Tag}. */ +export type TagRef = number; +/** Reference to a {@link Module.Global}. */ +export type GlobalRef = number; +/** Reference to a {@link Module.Memory}. */ +export type MemoryRef = number; +/** Reference to a {@link Module.Table}. */ +export type TableRef = number; +/** Reference to a {@link Module.Function}. */ +export type FunctionRef = number; +/** Reference to a {@link Module.DataSegment}. */ +export type DataSegmentRef = number; +/** Reference to an {@link Module.ElementSegment}. */ +export type ElementSegmentRef = number; +// no `ImportRef` +/** Reference to an {@link Module.Export}. */ +export type ExportRef = number; + + + +// ## Expression Types ## // +// see https://webassembly.github.io/spec/core/syntax/types.html + +// ### Binaryen-Only Types ### // +/** Type with stack effect `[t*] -> [t*]`. */ +export const unreachable: Type = BinaryenObj["_BinaryenTypeUnreachable"](); +/** Type with stack effect `[t*] -> []`. Not to be confused with the WASM heap type `none`. */ +export const none: Type = BinaryenObj["_BinaryenTypeNone"](); +/** Used only for auto-detecting block types. */ +export const auto: Type = BinaryenObj["_BinaryenTypeAuto"](); + +// ### Number & Vector Types ### // +/** 32-bit integer. */ +export const i32: Type = BinaryenObj["_BinaryenTypeInt32"](); +/** 64-bit integer. */ +export const i64: Type = BinaryenObj["_BinaryenTypeInt64"](); +/** 32-bit float. */ +export const f32: Type = BinaryenObj["_BinaryenTypeFloat32"](); +/** 64-bit float. */ +export const f64: Type = BinaryenObj["_BinaryenTypeFloat64"](); +/** 128-bit vector (SIMD). */ +export const v128: Type = BinaryenObj["_BinaryenTypeVec128"](); + +// ### Reference Types ### // +/** `(ref null any)` */ +export const anyref: Type = BinaryenObj["_BinaryenTypeAnyref"](); +/** `(ref null eq)` */ +export const eqref: Type = BinaryenObj["_BinaryenTypeEqref"](); +/** `(ref null i31)` */ +export const i31ref: Type = BinaryenObj["_BinaryenTypeI31ref"](); +/** `(ref null struct)` */ +export const structref: Type = BinaryenObj["_BinaryenTypeStructref"](); +/** `(ref null array)` */ +export const arrayref: Type = BinaryenObj["_BinaryenTypeArrayref"](); +/** `(ref null func)` */ +export const funcref: Type = BinaryenObj["_BinaryenTypeFuncref"](); +/** `(ref null exn)` */ +// export const exnref: Type = BinaryenObj["_BinaryenTypeExnref"](); // TODO: uncomment once supported in Binaryen +/** `(ref null extern)` */ +export const externref: Type = BinaryenObj["_BinaryenTypeExternref"](); +/** `(ref null none)` */ +export const nullref: Type = BinaryenObj["_BinaryenTypeNullref"](); +/** `(ref null nofunc)` */ +export const nullfuncref: Type = BinaryenObj["_BinaryenTypeNullFuncref"](); +/** `(ref null noexn)` */ +// export const nullexnref: Type = BinaryenObj["_BinaryenTypeNullExnref"](); // TODO: uncomment once supported in Binaryen +/** `(ref null noextern)` */ +export const nullexternref: Type = BinaryenObj["_BinaryenTypeNullExternref"](); + +// ### Packed Types ### // +export const notPacked: PackedType = BinaryenObj["_BinaryenPackedTypeNotPacked"](); +export const i8: PackedType = BinaryenObj["_BinaryenPackedTypeInt8"](); +export const i16: PackedType = BinaryenObj["_BinaryenPackedTypeInt16"](); + +// ### Proposed Types ### // +// These types are not yet in the WASM spec. Move them to their respective sections once finalized. +/** `(ref null string)` */ +export const stringref: Type = BinaryenObj["_BinaryenTypeStringref"](); + + + +// ## Enumerated Values ## // +/** + * An enumeration of all the “kinds” of expressions. + * @see https://webassembly.github.io/spec/core/syntax/instructions.html + */ +export enum ExpressionId { + // ### Binaryen-Only Instruction Ids ### // + Invalid = BinaryenObj["_BinaryenInvalidId"](), + Pop = BinaryenObj["_BinaryenPopId"](), + + // ### Parametric Instruction Ids ### // + Nop = BinaryenObj["_BinaryenNopId"](), + Unreachable = BinaryenObj["_BinaryenUnreachableId"](), + Drop = BinaryenObj["_BinaryenDropId"](), + Select = BinaryenObj["_BinaryenSelectId"](), + + // ### Control Instruction Ids ### // + Block = BinaryenObj["_BinaryenBlockId"](), + Loop = BinaryenObj["_BinaryenLoopId"](), + If = BinaryenObj["_BinaryenIfId"](), + Break = BinaryenObj["_BinaryenBreakId"](), + Switch = BinaryenObj["_BinaryenSwitchId"](), + BrOn = BinaryenObj["_BinaryenBrOnId"](), + Call = BinaryenObj["_BinaryenCallId"](), + CallRef = BinaryenObj["_BinaryenCallRefId"](), + CallIndirect = BinaryenObj["_BinaryenCallIndirectId"](), + Return = BinaryenObj["_BinaryenReturnId"](), + Throw = BinaryenObj["_BinaryenThrowId"](), + Rethrow = BinaryenObj["_BinaryenRethrowId"](), + // TODO: ThrowRef + Try = BinaryenObj["_BinaryenTryId"](), + // TODO: TryTable + + // ### Variable Instruction Ids ### // + LocalGet = BinaryenObj["_BinaryenLocalGetId"](), + LocalSet = BinaryenObj["_BinaryenLocalSetId"](), + GlobalGet = BinaryenObj["_BinaryenGlobalGetId"](), + GlobalSet = BinaryenObj["_BinaryenGlobalSetId"](), + + // ### Table Instruction Ids ### // + TableGet = BinaryenObj["_BinaryenTableGetId"](), + TableSet = BinaryenObj["_BinaryenTableSetId"](), + TableSize = BinaryenObj["_BinaryenTableSizeId"](), + TableGrow = BinaryenObj["_BinaryenTableGrowId"](), + // TODO: TableFill + // TODO: TableCopy + // TODO: TableInit + // TODO: ElemDrop + + // ### Memory Instruction Ids ### // + Load = BinaryenObj["_BinaryenLoadId"](), + Store = BinaryenObj["_BinaryenStoreId"](), + SIMDLoad = BinaryenObj["_BinaryenSIMDLoadId"](), + SIMDLoadStoreLane = BinaryenObj["_BinaryenSIMDLoadStoreLaneId"](), + MemorySize = BinaryenObj["_BinaryenMemorySizeId"](), + MemoryGrow = BinaryenObj["_BinaryenMemoryGrowId"](), + MemoryFill = BinaryenObj["_BinaryenMemoryFillId"](), + MemoryCopy = BinaryenObj["_BinaryenMemoryCopyId"](), + MemoryInit = BinaryenObj["_BinaryenMemoryInitId"](), + DataDrop = BinaryenObj["_BinaryenDataDropId"](), + + // ### Reference Instruction Ids ### // + RefFunc = BinaryenObj["_BinaryenRefFuncId"](), + RefNull = BinaryenObj["_BinaryenRefNullId"](), + RefIsNull = BinaryenObj["_BinaryenRefIsNullId"](), + RefAs = BinaryenObj["_BinaryenRefAsId"](), + RefEq = BinaryenObj["_BinaryenRefEqId"](), + RefTest = BinaryenObj["_BinaryenRefTestId"](), + RefCast = BinaryenObj["_BinaryenRefCastId"](), + // TODO: RefGetDesc + RefI31 = BinaryenObj["_BinaryenRefI31Id"](), + I31Get = BinaryenObj["_BinaryenI31GetId"](), + + // ### Aggregate Instruction Ids ### // + TupleMake = BinaryenObj["_BinaryenTupleMakeId"](), + TupleExtract = BinaryenObj["_BinaryenTupleExtractId"](), + StructNew = BinaryenObj["_BinaryenStructNewId"](), + StructGet = BinaryenObj["_BinaryenStructGetId"](), + StructSet = BinaryenObj["_BinaryenStructSetId"](), + // TODO: StructRMW + // TODO: StructCmpxchg + ArrayNew = BinaryenObj["_BinaryenArrayNewId"](), + ArrayNewFixed = BinaryenObj["_BinaryenArrayNewFixedId"](), + ArrayNewData = BinaryenObj["_BinaryenArrayNewDataId"](), + ArrayNewElem = BinaryenObj["_BinaryenArrayNewElemId"](), + ArrayGet = BinaryenObj["_BinaryenArrayGetId"](), + ArraySet = BinaryenObj["_BinaryenArraySetId"](), + // TODO: ArrayLoadId + // TODO: ArrayStoreId + ArrayLen = BinaryenObj["_BinaryenArrayLenId"](), + ArrayFill = BinaryenObj["_BinaryenArrayFillId"](), + ArrayCopy = BinaryenObj["_BinaryenArrayCopyId"](), + ArrayInitData = BinaryenObj["_BinaryenArrayInitDataId"](), + ArrayInitElem = BinaryenObj["_BinaryenArrayInitElemId"](), + // TODO: ArrayRMWId + // TODO: ArrayCmpxchgId + + // ### Numeric & Vector Instruction Ids ### // + Const = BinaryenObj["_BinaryenConstId"](), + Unary = BinaryenObj["_BinaryenUnaryId"](), + Binary = BinaryenObj["_BinaryenBinaryId"](), + SIMDTernary = BinaryenObj["_BinaryenSIMDTernaryId"](), + SIMDShift = BinaryenObj["_BinaryenSIMDShiftId"](), + SIMDShuffle = BinaryenObj["_BinaryenSIMDShuffleId"](), + SIMDExtract = BinaryenObj["_BinaryenSIMDExtractId"](), + SIMDReplace = BinaryenObj["_BinaryenSIMDReplaceId"](), + + // ### Atomic Instruction Ids ### // + AtomicRMW = BinaryenObj["_BinaryenAtomicRMWId"](), + AtomicCmpxchg = BinaryenObj["_BinaryenAtomicCmpxchgId"](), + AtomicWait = BinaryenObj["_BinaryenAtomicWaitId"](), + AtomicNotify = BinaryenObj["_BinaryenAtomicNotifyId"](), + AtomicFence = BinaryenObj["_BinaryenAtomicFenceId"](), + + // ### Proposed Instruction Ids ### // + // These insructions are not yet in the WASM spec. Move them to their respective sections once finalized. + // #### Strings #### // + StringNew = BinaryenObj["_BinaryenStringNewId"](), + StringConst = BinaryenObj["_BinaryenStringConstId"](), + StringMeasure = BinaryenObj["_BinaryenStringMeasureId"](), + StringEncode = BinaryenObj["_BinaryenStringEncodeId"](), + StringConcat = BinaryenObj["_BinaryenStringConcatId"](), + StringEq = BinaryenObj["_BinaryenStringEqId"](), + // TODO: StringTest + StringWTF16Get = BinaryenObj["_BinaryenStringWTF16GetId"](), + StringSliceWTF = BinaryenObj["_BinaryenStringSliceWTFId"](), + // #### Wide Arithmetic #### // + WideIntAddSub = BinaryenObj["_BinaryenWideIntAddSubId"](), + WideIntMul = BinaryenObj["_BinaryenWideIntMulId"](), +} + +/** Expression side-effects. */ +export enum SideEffect { + None = BinaryenObj["_BinaryenSideEffectNone"](), + Branches = BinaryenObj["_BinaryenSideEffectBranches"](), + Calls = BinaryenObj["_BinaryenSideEffectCalls"](), + ReadsLocal = BinaryenObj["_BinaryenSideEffectReadsLocal"](), + WritesLocal = BinaryenObj["_BinaryenSideEffectWritesLocal"](), + ReadsGlobal = BinaryenObj["_BinaryenSideEffectReadsGlobal"](), + WritesGlobal = BinaryenObj["_BinaryenSideEffectWritesGlobal"](), + ReadsMemory = BinaryenObj["_BinaryenSideEffectReadsMemory"](), + WritesMemory = BinaryenObj["_BinaryenSideEffectWritesMemory"](), + ReadsTable = BinaryenObj["_BinaryenSideEffectReadsTable"](), + WritesTable = BinaryenObj["_BinaryenSideEffectWritesTable"](), + ImplicitTrap = BinaryenObj["_BinaryenSideEffectImplicitTrap"](), + IsAtomic = BinaryenObj["_BinaryenSideEffectIsAtomic"](), + Throws = BinaryenObj["_BinaryenSideEffectThrows"](), + DanglingPop = BinaryenObj["_BinaryenSideEffectDanglingPop"](), + TrapsNeverHappen = BinaryenObj["_BinaryenSideEffectTrapsNeverHappen"](), + Any = BinaryenObj["_BinaryenSideEffectAny"](), +} + +/** + * External kinds. + * @see https://webassembly.github.io/spec/core/syntax/modules.html + */ +export enum ExternalKind { + ExternalTag = BinaryenObj["_BinaryenExternalTag"](), + ExternalGlobal = BinaryenObj["_BinaryenExternalGlobal"](), + ExternalMemory = BinaryenObj["_BinaryenExternalMemory"](), + ExternalTable = BinaryenObj["_BinaryenExternalTable"](), + ExternalFunction = BinaryenObj["_BinaryenExternalFunction"](), +} + +/** + * Operations + * @see https://webassembly.github.io/spec/core/exec/numerics.html + */ +export enum Operation { + // ### Control Operations ### // + BrOnNull = BinaryenObj["_BinaryenBrOnNull"](), + BrOnNonNull = BinaryenObj["_BinaryenBrOnNonNull"](), + BrOnCast = BinaryenObj["_BinaryenBrOnCast"](), + BrOnCastFail = BinaryenObj["_BinaryenBrOnCastFail"](), + + // ### Memory Operations ### // + Load8x8SVec128 = BinaryenObj["_BinaryenLoad8x8SVec128"](), + Load8x8UVec128 = BinaryenObj["_BinaryenLoad8x8UVec128"](), + Load16x4SVec128 = BinaryenObj["_BinaryenLoad16x4SVec128"](), + Load16x4UVec128 = BinaryenObj["_BinaryenLoad16x4UVec128"](), + Load32x2SVec128 = BinaryenObj["_BinaryenLoad32x2SVec128"](), + Load32x2UVec128 = BinaryenObj["_BinaryenLoad32x2UVec128"](), + Load8SplatVec128 = BinaryenObj["_BinaryenLoad8SplatVec128"](), + Load16SplatVec128 = BinaryenObj["_BinaryenLoad16SplatVec128"](), + Load32SplatVec128 = BinaryenObj["_BinaryenLoad32SplatVec128"](), + Load64SplatVec128 = BinaryenObj["_BinaryenLoad64SplatVec128"](), + Load32ZeroVec128 = BinaryenObj["_BinaryenLoad32ZeroVec128"](), + Load64ZeroVec128 = BinaryenObj["_BinaryenLoad64ZeroVec128"](), + Load8LaneVec128 = BinaryenObj["_BinaryenLoad8LaneVec128"](), + Load16LaneVec128 = BinaryenObj["_BinaryenLoad16LaneVec128"](), + Load32LaneVec128 = BinaryenObj["_BinaryenLoad32LaneVec128"](), + Load64LaneVec128 = BinaryenObj["_BinaryenLoad64LaneVec128"](), + Store8LaneVec128 = BinaryenObj["_BinaryenStore8LaneVec128"](), + Store16LaneVec128 = BinaryenObj["_BinaryenStore16LaneVec128"](), + Store32LaneVec128 = BinaryenObj["_BinaryenStore32LaneVec128"](), + Store64LaneVec128 = BinaryenObj["_BinaryenStore64LaneVec128"](), + + // ### Reference Operations ### // + RefAsNonNull = BinaryenObj["_BinaryenRefAsNonNull"](), + RefAsExternInternalize = BinaryenObj["_BinaryenRefAsExternInternalize"](), + RefAsExternExternalize = BinaryenObj["_BinaryenRefAsExternExternalize"](), + RefAsAnyConvertExtern = BinaryenObj["_BinaryenRefAsAnyConvertExtern"](), + RefAsExternConvertAny = BinaryenObj["_BinaryenRefAsExternConvertAny"](), + + // ### Integer Operations ### // + // #### unop #### // + ClzInt32 = BinaryenObj["_BinaryenClzInt32"](), + ClzInt64 = BinaryenObj["_BinaryenClzInt64"](), + CtzInt32 = BinaryenObj["_BinaryenCtzInt32"](), + CtzInt64 = BinaryenObj["_BinaryenCtzInt64"](), + PopcntInt32 = BinaryenObj["_BinaryenPopcntInt32"](), + PopcntInt64 = BinaryenObj["_BinaryenPopcntInt64"](), + ExtendS8Int32 = BinaryenObj["_BinaryenExtendS8Int32"](), + ExtendS8Int64 = BinaryenObj["_BinaryenExtendS8Int64"](), + ExtendS16Int32 = BinaryenObj["_BinaryenExtendS16Int32"](), + ExtendS16Int64 = BinaryenObj["_BinaryenExtendS16Int64"](), + ExtendS32Int64 = BinaryenObj["_BinaryenExtendS32Int64"](), + // #### binop #### // + AddInt32 = BinaryenObj["_BinaryenAddInt32"](), + AddInt64 = BinaryenObj["_BinaryenAddInt64"](), + SubInt32 = BinaryenObj["_BinaryenSubInt32"](), + SubInt64 = BinaryenObj["_BinaryenSubInt64"](), + MulInt32 = BinaryenObj["_BinaryenMulInt32"](), + MulInt64 = BinaryenObj["_BinaryenMulInt64"](), + DivSInt32 = BinaryenObj["_BinaryenDivSInt32"](), + DivSInt64 = BinaryenObj["_BinaryenDivSInt64"](), + DivUInt32 = BinaryenObj["_BinaryenDivUInt32"](), + DivUInt64 = BinaryenObj["_BinaryenDivUInt64"](), + RemSInt32 = BinaryenObj["_BinaryenRemSInt32"](), + RemSInt64 = BinaryenObj["_BinaryenRemSInt64"](), + RemUInt32 = BinaryenObj["_BinaryenRemUInt32"](), + RemUInt64 = BinaryenObj["_BinaryenRemUInt64"](), + AndInt32 = BinaryenObj["_BinaryenAndInt32"](), + AndInt64 = BinaryenObj["_BinaryenAndInt64"](), + OrInt32 = BinaryenObj["_BinaryenOrInt32"](), + OrInt64 = BinaryenObj["_BinaryenOrInt64"](), + XorInt32 = BinaryenObj["_BinaryenXorInt32"](), + XorInt64 = BinaryenObj["_BinaryenXorInt64"](), + ShlInt32 = BinaryenObj["_BinaryenShlInt32"](), + ShlInt64 = BinaryenObj["_BinaryenShlInt64"](), + ShrSInt32 = BinaryenObj["_BinaryenShrSInt32"](), + ShrSInt64 = BinaryenObj["_BinaryenShrSInt64"](), + ShrUInt32 = BinaryenObj["_BinaryenShrUInt32"](), + ShrUInt64 = BinaryenObj["_BinaryenShrUInt64"](), + RotLInt32 = BinaryenObj["_BinaryenRotLInt32"](), + RotLInt64 = BinaryenObj["_BinaryenRotLInt64"](), + RotRInt32 = BinaryenObj["_BinaryenRotRInt32"](), + RotRInt64 = BinaryenObj["_BinaryenRotRInt64"](), + // #### testop #### // + EqZInt32 = BinaryenObj["_BinaryenEqZInt32"](), + EqZInt64 = BinaryenObj["_BinaryenEqZInt64"](), + // #### relop #### // + EqInt32 = BinaryenObj["_BinaryenEqInt32"](), + EqInt64 = BinaryenObj["_BinaryenEqInt64"](), + NeInt32 = BinaryenObj["_BinaryenNeInt32"](), + NeInt64 = BinaryenObj["_BinaryenNeInt64"](), + LtSInt32 = BinaryenObj["_BinaryenLtSInt32"](), + LtSInt64 = BinaryenObj["_BinaryenLtSInt64"](), + LtUInt32 = BinaryenObj["_BinaryenLtUInt32"](), + LtUInt64 = BinaryenObj["_BinaryenLtUInt64"](), + GtSInt32 = BinaryenObj["_BinaryenGtSInt32"](), + GtSInt64 = BinaryenObj["_BinaryenGtSInt64"](), + GtUInt32 = BinaryenObj["_BinaryenGtUInt32"](), + GtUInt64 = BinaryenObj["_BinaryenGtUInt64"](), + LeSInt32 = BinaryenObj["_BinaryenLeSInt32"](), + LeSInt64 = BinaryenObj["_BinaryenLeSInt64"](), + LeUInt32 = BinaryenObj["_BinaryenLeUInt32"](), + LeUInt64 = BinaryenObj["_BinaryenLeUInt64"](), + GeSInt32 = BinaryenObj["_BinaryenGeSInt32"](), + GeSInt64 = BinaryenObj["_BinaryenGeSInt64"](), + GeUInt32 = BinaryenObj["_BinaryenGeUInt32"](), + GeUInt64 = BinaryenObj["_BinaryenGeUInt64"](), + + // ### Floating-Point Operations ### // + // #### unop #### // + AbsFloat32 = BinaryenObj["_BinaryenAbsFloat32"](), + AbsFloat64 = BinaryenObj["_BinaryenAbsFloat64"](), + NegFloat32 = BinaryenObj["_BinaryenNegFloat32"](), + NegFloat64 = BinaryenObj["_BinaryenNegFloat64"](), + SqrtFloat32 = BinaryenObj["_BinaryenSqrtFloat32"](), + SqrtFloat64 = BinaryenObj["_BinaryenSqrtFloat64"](), + CeilFloat32 = BinaryenObj["_BinaryenCeilFloat32"](), + CeilFloat64 = BinaryenObj["_BinaryenCeilFloat64"](), + FloorFloat32 = BinaryenObj["_BinaryenFloorFloat32"](), + FloorFloat64 = BinaryenObj["_BinaryenFloorFloat64"](), + TruncFloat32 = BinaryenObj["_BinaryenTruncFloat32"](), + TruncFloat64 = BinaryenObj["_BinaryenTruncFloat64"](), + NearestFloat32 = BinaryenObj["_BinaryenNearestFloat32"](), + NearestFloat64 = BinaryenObj["_BinaryenNearestFloat64"](), + // #### binop #### // + AddFloat32 = BinaryenObj["_BinaryenAddFloat32"](), + AddFloat64 = BinaryenObj["_BinaryenAddFloat64"](), + SubFloat32 = BinaryenObj["_BinaryenSubFloat32"](), + SubFloat64 = BinaryenObj["_BinaryenSubFloat64"](), + MulFloat32 = BinaryenObj["_BinaryenMulFloat32"](), + MulFloat64 = BinaryenObj["_BinaryenMulFloat64"](), + DivFloat32 = BinaryenObj["_BinaryenDivFloat32"](), + DivFloat64 = BinaryenObj["_BinaryenDivFloat64"](), + MinFloat32 = BinaryenObj["_BinaryenMinFloat32"](), + MinFloat64 = BinaryenObj["_BinaryenMinFloat64"](), + MaxFloat32 = BinaryenObj["_BinaryenMaxFloat32"](), + MaxFloat64 = BinaryenObj["_BinaryenMaxFloat64"](), + CopySignFloat32 = BinaryenObj["_BinaryenCopySignFloat32"](), + CopySignFloat64 = BinaryenObj["_BinaryenCopySignFloat64"](), + // #### relop #### // + EqFloat32 = BinaryenObj["_BinaryenEqFloat32"](), + EqFloat64 = BinaryenObj["_BinaryenEqFloat64"](), + NeFloat32 = BinaryenObj["_BinaryenNeFloat32"](), + NeFloat64 = BinaryenObj["_BinaryenNeFloat64"](), + LtFloat32 = BinaryenObj["_BinaryenLtFloat32"](), + LtFloat64 = BinaryenObj["_BinaryenLtFloat64"](), + GtFloat32 = BinaryenObj["_BinaryenGtFloat32"](), + GtFloat64 = BinaryenObj["_BinaryenGtFloat64"](), + LeFloat32 = BinaryenObj["_BinaryenLeFloat32"](), + LeFloat64 = BinaryenObj["_BinaryenLeFloat64"](), + GeFloat32 = BinaryenObj["_BinaryenGeFloat32"](), + GeFloat64 = BinaryenObj["_BinaryenGeFloat64"](), + + // ### Conversions ### // + ExtendSInt32 = BinaryenObj["_BinaryenExtendSInt32"](), + ExtendUInt32 = BinaryenObj["_BinaryenExtendUInt32"](), + WrapInt64 = BinaryenObj["_BinaryenWrapInt64"](), + TruncSFloat32ToInt32 = BinaryenObj["_BinaryenTruncSFloat32ToInt32"](), + TruncSFloat32ToInt64 = BinaryenObj["_BinaryenTruncSFloat32ToInt64"](), + TruncSFloat64ToInt32 = BinaryenObj["_BinaryenTruncSFloat64ToInt32"](), + TruncSFloat64ToInt64 = BinaryenObj["_BinaryenTruncSFloat64ToInt64"](), + TruncUFloat32ToInt32 = BinaryenObj["_BinaryenTruncUFloat32ToInt32"](), + TruncUFloat32ToInt64 = BinaryenObj["_BinaryenTruncUFloat32ToInt64"](), + TruncUFloat64ToInt32 = BinaryenObj["_BinaryenTruncUFloat64ToInt32"](), + TruncUFloat64ToInt64 = BinaryenObj["_BinaryenTruncUFloat64ToInt64"](), + TruncSatSFloat32ToInt32 = BinaryenObj["_BinaryenTruncSatSFloat32ToInt32"](), + TruncSatSFloat32ToInt64 = BinaryenObj["_BinaryenTruncSatSFloat32ToInt64"](), + TruncSatSFloat64ToInt32 = BinaryenObj["_BinaryenTruncSatSFloat64ToInt32"](), + TruncSatSFloat64ToInt64 = BinaryenObj["_BinaryenTruncSatSFloat64ToInt64"](), + TruncSatUFloat32ToInt32 = BinaryenObj["_BinaryenTruncSatUFloat32ToInt32"](), + TruncSatUFloat32ToInt64 = BinaryenObj["_BinaryenTruncSatUFloat32ToInt64"](), + TruncSatUFloat64ToInt32 = BinaryenObj["_BinaryenTruncSatUFloat64ToInt32"](), + TruncSatUFloat64ToInt64 = BinaryenObj["_BinaryenTruncSatUFloat64ToInt64"](), + ConvertSInt32ToFloat32 = BinaryenObj["_BinaryenConvertSInt32ToFloat32"](), + ConvertSInt32ToFloat64 = BinaryenObj["_BinaryenConvertSInt32ToFloat64"](), + ConvertSInt64ToFloat32 = BinaryenObj["_BinaryenConvertSInt64ToFloat32"](), + ConvertSInt64ToFloat64 = BinaryenObj["_BinaryenConvertSInt64ToFloat64"](), + ConvertUInt32ToFloat32 = BinaryenObj["_BinaryenConvertUInt32ToFloat32"](), + ConvertUInt32ToFloat64 = BinaryenObj["_BinaryenConvertUInt32ToFloat64"](), + ConvertUInt64ToFloat32 = BinaryenObj["_BinaryenConvertUInt64ToFloat32"](), + ConvertUInt64ToFloat64 = BinaryenObj["_BinaryenConvertUInt64ToFloat64"](), + ReinterpretInt32 = BinaryenObj["_BinaryenReinterpretInt32"](), + ReinterpretInt64 = BinaryenObj["_BinaryenReinterpretInt64"](), + ReinterpretFloat32 = BinaryenObj["_BinaryenReinterpretFloat32"](), + ReinterpretFloat64 = BinaryenObj["_BinaryenReinterpretFloat64"](), + PromoteFloat32 = BinaryenObj["_BinaryenPromoteFloat32"](), + DemoteFloat64 = BinaryenObj["_BinaryenDemoteFloat64"](), + + // ### Vector Operations ### // + // #### vvunop #### // + NotVec128 = BinaryenObj["_BinaryenNotVec128"](), + // #### vvbinop #### // + AndVec128 = BinaryenObj["_BinaryenAndVec128"](), + AndNotVec128 = BinaryenObj["_BinaryenAndNotVec128"](), + OrVec128 = BinaryenObj["_BinaryenOrVec128"](), + XorVec128 = BinaryenObj["_BinaryenXorVec128"](), + // #### vvternop #### // + BitselectVec128 = BinaryenObj["_BinaryenBitselectVec128"](), + // #### vvtestop #### // + AnyTrueVec128 = BinaryenObj["_BinaryenAnyTrueVec128"](), + // #### vunop_i #### // + AbsVecI8x16 = BinaryenObj["_BinaryenAbsVecI8x16"](), + AbsVecI16x8 = BinaryenObj["_BinaryenAbsVecI16x8"](), + AbsVecI32x4 = BinaryenObj["_BinaryenAbsVecI32x4"](), + AbsVecI64x2 = BinaryenObj["_BinaryenAbsVecI64x2"](), + NegVecI8x16 = BinaryenObj["_BinaryenNegVecI8x16"](), + NegVecI16x8 = BinaryenObj["_BinaryenNegVecI16x8"](), + NegVecI32x4 = BinaryenObj["_BinaryenNegVecI32x4"](), + NegVecI64x2 = BinaryenObj["_BinaryenNegVecI64x2"](), + PopcntVecI8x16 = BinaryenObj["_BinaryenPopcntVecI8x16"](), + // #### vunop_f #### // + AbsVecF32x4 = BinaryenObj["_BinaryenAbsVecF32x4"](), + AbsVecF64x2 = BinaryenObj["_BinaryenAbsVecF64x2"](), + NegVecF32x4 = BinaryenObj["_BinaryenNegVecF32x4"](), + NegVecF64x2 = BinaryenObj["_BinaryenNegVecF64x2"](), + SqrtVecF32x4 = BinaryenObj["_BinaryenSqrtVecF32x4"](), + SqrtVecF64x2 = BinaryenObj["_BinaryenSqrtVecF64x2"](), + CeilVecF32x4 = BinaryenObj["_BinaryenCeilVecF32x4"](), + CeilVecF64x2 = BinaryenObj["_BinaryenCeilVecF64x2"](), + FloorVecF32x4 = BinaryenObj["_BinaryenFloorVecF32x4"](), + FloorVecF64x2 = BinaryenObj["_BinaryenFloorVecF64x2"](), + TruncVecF32x4 = BinaryenObj["_BinaryenTruncVecF32x4"](), + TruncVecF64x2 = BinaryenObj["_BinaryenTruncVecF64x2"](), + NearestVecF32x4 = BinaryenObj["_BinaryenNearestVecF32x4"](), + NearestVecF64x2 = BinaryenObj["_BinaryenNearestVecF64x2"](), + // #### vbinop_i #### // + AddVecI8x16 = BinaryenObj["_BinaryenAddVecI8x16"](), + AddVecI16x8 = BinaryenObj["_BinaryenAddVecI16x8"](), + AddVecI32x4 = BinaryenObj["_BinaryenAddVecI32x4"](), + AddVecI64x2 = BinaryenObj["_BinaryenAddVecI64x2"](), + SubVecI8x16 = BinaryenObj["_BinaryenSubVecI8x16"](), + SubVecI16x8 = BinaryenObj["_BinaryenSubVecI16x8"](), + SubVecI32x4 = BinaryenObj["_BinaryenSubVecI32x4"](), + SubVecI64x2 = BinaryenObj["_BinaryenSubVecI64x2"](), + AddSatSVecI8x16 = BinaryenObj["_BinaryenAddSatSVecI8x16"](), + AddSatSVecI16x8 = BinaryenObj["_BinaryenAddSatSVecI16x8"](), + AddSatUVecI8x16 = BinaryenObj["_BinaryenAddSatUVecI8x16"](), + AddSatUVecI16x8 = BinaryenObj["_BinaryenAddSatUVecI16x8"](), + SubSatSVecI8x16 = BinaryenObj["_BinaryenSubSatSVecI8x16"](), + SubSatSVecI16x8 = BinaryenObj["_BinaryenSubSatSVecI16x8"](), + SubSatUVecI8x16 = BinaryenObj["_BinaryenSubSatUVecI8x16"](), + SubSatUVecI16x8 = BinaryenObj["_BinaryenSubSatUVecI16x8"](), + MulVecI16x8 = BinaryenObj["_BinaryenMulVecI16x8"](), + MulVecI32x4 = BinaryenObj["_BinaryenMulVecI32x4"](), + MulVecI64x2 = BinaryenObj["_BinaryenMulVecI64x2"](), + AvgrUVecI8x16 = BinaryenObj["_BinaryenAvgrUVecI8x16"](), + AvgrUVecI16x8 = BinaryenObj["_BinaryenAvgrUVecI16x8"](), + Q15MulrSatSVecI16x8 = BinaryenObj["_BinaryenQ15MulrSatSVecI16x8"](), + RelaxedQ15MulrSVecI16x8 = BinaryenObj["_BinaryenRelaxedQ15MulrSVecI16x8"](), + MinSVecI8x16 = BinaryenObj["_BinaryenMinSVecI8x16"](), + MinSVecI16x8 = BinaryenObj["_BinaryenMinSVecI16x8"](), + MinSVecI32x4 = BinaryenObj["_BinaryenMinSVecI32x4"](), + MinUVecI8x16 = BinaryenObj["_BinaryenMinUVecI8x16"](), + MinUVecI16x8 = BinaryenObj["_BinaryenMinUVecI16x8"](), + MinUVecI32x4 = BinaryenObj["_BinaryenMinUVecI32x4"](), + MaxSVecI8x16 = BinaryenObj["_BinaryenMaxSVecI8x16"](), + MaxSVecI16x8 = BinaryenObj["_BinaryenMaxSVecI16x8"](), + MaxSVecI32x4 = BinaryenObj["_BinaryenMaxSVecI32x4"](), + MaxUVecI8x16 = BinaryenObj["_BinaryenMaxUVecI8x16"](), + MaxUVecI16x8 = BinaryenObj["_BinaryenMaxUVecI16x8"](), + MaxUVecI32x4 = BinaryenObj["_BinaryenMaxUVecI32x4"](), + // #### vbinop_f #### // + AddVecF32x4 = BinaryenObj["_BinaryenAddVecF32x4"](), + AddVecF64x2 = BinaryenObj["_BinaryenAddVecF64x2"](), + SubVecF32x4 = BinaryenObj["_BinaryenSubVecF32x4"](), + SubVecF64x2 = BinaryenObj["_BinaryenSubVecF64x2"](), + MulVecF32x4 = BinaryenObj["_BinaryenMulVecF32x4"](), + MulVecF64x2 = BinaryenObj["_BinaryenMulVecF64x2"](), + DivVecF32x4 = BinaryenObj["_BinaryenDivVecF32x4"](), + DivVecF64x2 = BinaryenObj["_BinaryenDivVecF64x2"](), + MinVecF32x4 = BinaryenObj["_BinaryenMinVecF32x4"](), + MinVecF64x2 = BinaryenObj["_BinaryenMinVecF64x2"](), + MaxVecF32x4 = BinaryenObj["_BinaryenMaxVecF32x4"](), + MaxVecF64x2 = BinaryenObj["_BinaryenMaxVecF64x2"](), + PMinVecF32x4 = BinaryenObj["_BinaryenPMinVecF32x4"](), + PMinVecF64x2 = BinaryenObj["_BinaryenPMinVecF64x2"](), + PMaxVecF32x4 = BinaryenObj["_BinaryenPMaxVecF32x4"](), + PMaxVecF64x2 = BinaryenObj["_BinaryenPMaxVecF64x2"](), + RelaxedMinVecF32x4 = BinaryenObj["_BinaryenRelaxedMinVecF32x4"](), + RelaxedMinVecF64x2 = BinaryenObj["_BinaryenRelaxedMinVecF64x2"](), + RelaxedMaxVecF32x4 = BinaryenObj["_BinaryenRelaxedMaxVecF32x4"](), + RelaxedMaxVecF64x2 = BinaryenObj["_BinaryenRelaxedMaxVecF64x2"](), + // #### vternop_i #### // + RelaxedLaneselectI8x16 = BinaryenObj["_BinaryenRelaxedLaneselectI8x16"](), + RelaxedLaneselectI16x8 = BinaryenObj["_BinaryenRelaxedLaneselectI16x8"](), + RelaxedLaneselectI32x4 = BinaryenObj["_BinaryenRelaxedLaneselectI32x4"](), + RelaxedLaneselectI64x2 = BinaryenObj["_BinaryenRelaxedLaneselectI64x2"](), + // #### vternop_f #### // + RelaxedMaddVecF32x4 = BinaryenObj["_BinaryenRelaxedMaddVecF32x4"](), + RelaxedMaddVecF64x2 = BinaryenObj["_BinaryenRelaxedMaddVecF64x2"](), + RelaxedNmaddVecF32x4 = BinaryenObj["_BinaryenRelaxedNmaddVecF32x4"](), + RelaxedNmaddVecF64x2 = BinaryenObj["_BinaryenRelaxedNmaddVecF64x2"](), + // #### vtestop_i #### // + AllTrueVecI8x16 = BinaryenObj["_BinaryenAllTrueVecI8x16"](), + AllTrueVecI16x8 = BinaryenObj["_BinaryenAllTrueVecI16x8"](), + AllTrueVecI32x4 = BinaryenObj["_BinaryenAllTrueVecI32x4"](), + AllTrueVecI64x2 = BinaryenObj["_BinaryenAllTrueVecI64x2"](), + // #### vrelop_i #### // + EqVecI8x16 = BinaryenObj["_BinaryenEqVecI8x16"](), + EqVecI16x8 = BinaryenObj["_BinaryenEqVecI16x8"](), + EqVecI32x4 = BinaryenObj["_BinaryenEqVecI32x4"](), + EqVecI64x2 = BinaryenObj["_BinaryenEqVecI64x2"](), + NeVecI8x16 = BinaryenObj["_BinaryenNeVecI8x16"](), + NeVecI16x8 = BinaryenObj["_BinaryenNeVecI16x8"](), + NeVecI32x4 = BinaryenObj["_BinaryenNeVecI32x4"](), + NeVecI64x2 = BinaryenObj["_BinaryenNeVecI64x2"](), + LtSVecI8x16 = BinaryenObj["_BinaryenLtSVecI8x16"](), + LtSVecI16x8 = BinaryenObj["_BinaryenLtSVecI16x8"](), + LtSVecI32x4 = BinaryenObj["_BinaryenLtSVecI32x4"](), + LtSVecI64x2 = BinaryenObj["_BinaryenLtSVecI64x2"](), + LtUVecI8x16 = BinaryenObj["_BinaryenLtUVecI8x16"](), + LtUVecI16x8 = BinaryenObj["_BinaryenLtUVecI16x8"](), + LtUVecI32x4 = BinaryenObj["_BinaryenLtUVecI32x4"](), + // LtUVecI64x2 // not supported; see #414 + GtSVecI8x16 = BinaryenObj["_BinaryenGtSVecI8x16"](), + GtSVecI16x8 = BinaryenObj["_BinaryenGtSVecI16x8"](), + GtSVecI32x4 = BinaryenObj["_BinaryenGtSVecI32x4"](), + GtSVecI64x2 = BinaryenObj["_BinaryenGtSVecI64x2"](), + GtUVecI8x16 = BinaryenObj["_BinaryenGtUVecI8x16"](), + GtUVecI16x8 = BinaryenObj["_BinaryenGtUVecI16x8"](), + GtUVecI32x4 = BinaryenObj["_BinaryenGtUVecI32x4"](), + // GtUVecI64x2 // not supported; see #414 + LeSVecI8x16 = BinaryenObj["_BinaryenLeSVecI8x16"](), + LeSVecI16x8 = BinaryenObj["_BinaryenLeSVecI16x8"](), + LeSVecI32x4 = BinaryenObj["_BinaryenLeSVecI32x4"](), + LeSVecI64x2 = BinaryenObj["_BinaryenLeSVecI64x2"](), + LeUVecI8x16 = BinaryenObj["_BinaryenLeUVecI8x16"](), + LeUVecI16x8 = BinaryenObj["_BinaryenLeUVecI16x8"](), + LeUVecI32x4 = BinaryenObj["_BinaryenLeUVecI32x4"](), + // LeUVecI64x2 // not supported; see #414 + GeSVecI8x16 = BinaryenObj["_BinaryenGeSVecI8x16"](), + GeSVecI16x8 = BinaryenObj["_BinaryenGeSVecI16x8"](), + GeSVecI32x4 = BinaryenObj["_BinaryenGeSVecI32x4"](), + GeSVecI64x2 = BinaryenObj["_BinaryenGeSVecI64x2"](), + GeUVecI8x16 = BinaryenObj["_BinaryenGeUVecI8x16"](), + GeUVecI16x8 = BinaryenObj["_BinaryenGeUVecI16x8"](), + GeUVecI32x4 = BinaryenObj["_BinaryenGeUVecI32x4"](), + // GeUVecI64x2 // not supported; see #414 + // #### vrelop_f #### // + EqVecF32x4 = BinaryenObj["_BinaryenEqVecF32x4"](), + EqVecF64x2 = BinaryenObj["_BinaryenEqVecF64x2"](), + NeVecF32x4 = BinaryenObj["_BinaryenNeVecF32x4"](), + NeVecF64x2 = BinaryenObj["_BinaryenNeVecF64x2"](), + LtVecF32x4 = BinaryenObj["_BinaryenLtVecF32x4"](), + LtVecF64x2 = BinaryenObj["_BinaryenLtVecF64x2"](), + GtVecF32x4 = BinaryenObj["_BinaryenGtVecF32x4"](), + GtVecF64x2 = BinaryenObj["_BinaryenGtVecF64x2"](), + LeVecF32x4 = BinaryenObj["_BinaryenLeVecF32x4"](), + LeVecF64x2 = BinaryenObj["_BinaryenLeVecF64x2"](), + GeVecF32x4 = BinaryenObj["_BinaryenGeVecF32x4"](), + GeVecF64x2 = BinaryenObj["_BinaryenGeVecF64x2"](), + // #### vshiftop #### // + ShlVecI8x16 = BinaryenObj["_BinaryenShlVecI8x16"](), + ShlVecI16x8 = BinaryenObj["_BinaryenShlVecI16x8"](), + ShlVecI32x4 = BinaryenObj["_BinaryenShlVecI32x4"](), + ShlVecI64x2 = BinaryenObj["_BinaryenShlVecI64x2"](), + ShrSVecI8x16 = BinaryenObj["_BinaryenShrSVecI8x16"](), + ShrSVecI16x8 = BinaryenObj["_BinaryenShrSVecI16x8"](), + ShrSVecI32x4 = BinaryenObj["_BinaryenShrSVecI32x4"](), + ShrSVecI64x2 = BinaryenObj["_BinaryenShrSVecI64x2"](), + ShrUVecI8x16 = BinaryenObj["_BinaryenShrUVecI8x16"](), + ShrUVecI16x8 = BinaryenObj["_BinaryenShrUVecI16x8"](), + ShrUVecI32x4 = BinaryenObj["_BinaryenShrUVecI32x4"](), + ShrUVecI64x2 = BinaryenObj["_BinaryenShrUVecI64x2"](), + // #### bitmask #### // + BitmaskVecI8x16 = BinaryenObj["_BinaryenBitmaskVecI8x16"](), + BitmaskVecI16x8 = BinaryenObj["_BinaryenBitmaskVecI16x8"](), + BitmaskVecI32x4 = BinaryenObj["_BinaryenBitmaskVecI32x4"](), + BitmaskVecI64x2 = BinaryenObj["_BinaryenBitmaskVecI64x2"](), + // #### vswizzleop #### // + SwizzleVecI8x16 = BinaryenObj["_BinaryenSwizzleVecI8x16"](), + RelaxedSwizzleVecI8x16 = BinaryenObj["_BinaryenRelaxedSwizzleVecI8x16"](), + // #### vextunop #### // + ExtAddPairwiseSVecI8x16ToI16x8 = BinaryenObj["_BinaryenExtAddPairwiseSVecI8x16ToI16x8"](), + ExtAddPairwiseSVecI16x8ToI32x4 = BinaryenObj["_BinaryenExtAddPairwiseSVecI16x8ToI32x4"](), + ExtAddPairwiseUVecI8x16ToI16x8 = BinaryenObj["_BinaryenExtAddPairwiseUVecI8x16ToI16x8"](), + ExtAddPairwiseUVecI16x8ToI32x4 = BinaryenObj["_BinaryenExtAddPairwiseUVecI16x8ToI32x4"](), + // #### vextbinop #### // + ExtMulLowSVecI16x8 = BinaryenObj["_BinaryenExtMulLowSVecI16x8"](), + ExtMulLowSVecI32x4 = BinaryenObj["_BinaryenExtMulLowSVecI32x4"](), + ExtMulLowSVecI64x2 = BinaryenObj["_BinaryenExtMulLowSVecI64x2"](), + ExtMulLowUVecI16x8 = BinaryenObj["_BinaryenExtMulLowUVecI16x8"](), + ExtMulLowUVecI32x4 = BinaryenObj["_BinaryenExtMulLowUVecI32x4"](), + ExtMulLowUVecI64x2 = BinaryenObj["_BinaryenExtMulLowUVecI64x2"](), + ExtMulHighSVecI16x8 = BinaryenObj["_BinaryenExtMulHighSVecI16x8"](), + ExtMulHighSVecI32x4 = BinaryenObj["_BinaryenExtMulHighSVecI32x4"](), + ExtMulHighSVecI64x2 = BinaryenObj["_BinaryenExtMulHighSVecI64x2"](), + ExtMulHighUVecI16x8 = BinaryenObj["_BinaryenExtMulHighUVecI16x8"](), + ExtMulHighUVecI32x4 = BinaryenObj["_BinaryenExtMulHighUVecI32x4"](), + ExtMulHighUVecI64x2 = BinaryenObj["_BinaryenExtMulHighUVecI64x2"](), + DotSVecI16x8ToVecI32x4 = BinaryenObj["_BinaryenDotSVecI16x8ToVecI32x4"](), + RelaxedDotI8x16I7x16SToVecI16x8 = BinaryenObj["_BinaryenRelaxedDotI8x16I7x16SToVecI16x8"](), + RelaxedDotI8x16I7x16AddSToVecI32x4 = BinaryenObj["_BinaryenRelaxedDotI8x16I7x16AddSToVecI32x4"](), + // #### narrow #### // + NarrowSVecI16x8ToVecI8x16 = BinaryenObj["_BinaryenNarrowSVecI16x8ToVecI8x16"](), + NarrowSVecI32x4ToVecI16x8 = BinaryenObj["_BinaryenNarrowSVecI32x4ToVecI16x8"](), + NarrowUVecI16x8ToVecI8x16 = BinaryenObj["_BinaryenNarrowUVecI16x8ToVecI8x16"](), + NarrowUVecI32x4ToVecI16x8 = BinaryenObj["_BinaryenNarrowUVecI32x4ToVecI16x8"](), + // #### vcvtop #### // + ExtendLowSVecI8x16ToVecI16x8 = BinaryenObj["_BinaryenExtendLowSVecI8x16ToVecI16x8"](), + ExtendLowSVecI16x8ToVecI32x4 = BinaryenObj["_BinaryenExtendLowSVecI16x8ToVecI32x4"](), + ExtendLowSVecI32x4ToVecI64x2 = BinaryenObj["_BinaryenExtendLowSVecI32x4ToVecI64x2"](), + ExtendLowUVecI8x16ToVecI16x8 = BinaryenObj["_BinaryenExtendLowUVecI8x16ToVecI16x8"](), + ExtendLowUVecI16x8ToVecI32x4 = BinaryenObj["_BinaryenExtendLowUVecI16x8ToVecI32x4"](), + ExtendLowUVecI32x4ToVecI64x2 = BinaryenObj["_BinaryenExtendLowUVecI32x4ToVecI64x2"](), + ExtendHighSVecI8x16ToVecI16x8 = BinaryenObj["_BinaryenExtendHighSVecI8x16ToVecI16x8"](), + ExtendHighSVecI16x8ToVecI32x4 = BinaryenObj["_BinaryenExtendHighSVecI16x8ToVecI32x4"](), + ExtendHighSVecI32x4ToVecI64x2 = BinaryenObj["_BinaryenExtendHighSVecI32x4ToVecI64x2"](), + ExtendHighUVecI8x16ToVecI16x8 = BinaryenObj["_BinaryenExtendHighUVecI8x16ToVecI16x8"](), + ExtendHighUVecI16x8ToVecI32x4 = BinaryenObj["_BinaryenExtendHighUVecI16x8ToVecI32x4"](), + ExtendHighUVecI32x4ToVecI64x2 = BinaryenObj["_BinaryenExtendHighUVecI32x4ToVecI64x2"](), + ConvertSVecI32x4ToVecF32x4 = BinaryenObj["_BinaryenConvertSVecI32x4ToVecF32x4"](), + ConvertUVecI32x4ToVecF32x4 = BinaryenObj["_BinaryenConvertUVecI32x4ToVecF32x4"](), + ConvertLowSVecI32x4ToVecF64x2 = BinaryenObj["_BinaryenConvertLowSVecI32x4ToVecF64x2"](), + ConvertLowUVecI32x4ToVecF64x2 = BinaryenObj["_BinaryenConvertLowUVecI32x4ToVecF64x2"](), + TruncSatSVecF32x4ToVecI32x4 = BinaryenObj["_BinaryenTruncSatSVecF32x4ToVecI32x4"](), + TruncSatUVecF32x4ToVecI32x4 = BinaryenObj["_BinaryenTruncSatUVecF32x4ToVecI32x4"](), + TruncSatZeroSVecF64x2ToVecI32x4 = BinaryenObj["_BinaryenTruncSatZeroSVecF64x2ToVecI32x4"](), + TruncSatZeroUVecF64x2ToVecI32x4 = BinaryenObj["_BinaryenTruncSatZeroUVecF64x2ToVecI32x4"](), + RelaxedTruncSVecF32x4ToVecI32x4 = BinaryenObj["_BinaryenRelaxedTruncSVecF32x4ToVecI32x4"](), + RelaxedTruncUVecF32x4ToVecI32x4 = BinaryenObj["_BinaryenRelaxedTruncUVecF32x4ToVecI32x4"](), + RelaxedTruncZeroSVecF64x2ToVecI32x4 = BinaryenObj["_BinaryenRelaxedTruncZeroSVecF64x2ToVecI32x4"](), + RelaxedTruncZeroUVecF64x2ToVecI32x4 = BinaryenObj["_BinaryenRelaxedTruncZeroUVecF64x2ToVecI32x4"](), + DemoteZeroVecF64x2ToVecF32x4 = BinaryenObj["_BinaryenDemoteZeroVecF64x2ToVecF32x4"](), + PromoteLowVecF32x4ToVecF64x2 = BinaryenObj["_BinaryenPromoteLowVecF32x4ToVecF64x2"](), + // #### splat #### // + SplatVecI8x16 = BinaryenObj["_BinaryenSplatVecI8x16"](), + SplatVecI16x8 = BinaryenObj["_BinaryenSplatVecI16x8"](), + SplatVecI32x4 = BinaryenObj["_BinaryenSplatVecI32x4"](), + SplatVecI64x2 = BinaryenObj["_BinaryenSplatVecI64x2"](), + SplatVecF32x4 = BinaryenObj["_BinaryenSplatVecF32x4"](), + SplatVecF64x2 = BinaryenObj["_BinaryenSplatVecF64x2"](), + // #### extract_lane #### // + ExtractLaneSVecI8x16 = BinaryenObj["_BinaryenExtractLaneSVecI8x16"](), + ExtractLaneSVecI16x8 = BinaryenObj["_BinaryenExtractLaneSVecI16x8"](), + ExtractLaneUVecI8x16 = BinaryenObj["_BinaryenExtractLaneUVecI8x16"](), + ExtractLaneUVecI16x8 = BinaryenObj["_BinaryenExtractLaneUVecI16x8"](), + ExtractLaneVecI32x4 = BinaryenObj["_BinaryenExtractLaneVecI32x4"](), + ExtractLaneVecI64x2 = BinaryenObj["_BinaryenExtractLaneVecI64x2"](), + ExtractLaneVecF32x4 = BinaryenObj["_BinaryenExtractLaneVecF32x4"](), + ExtractLaneVecF64x2 = BinaryenObj["_BinaryenExtractLaneVecF64x2"](), + // #### replace_lane #### // + ReplaceLaneVecI8x16 = BinaryenObj["_BinaryenReplaceLaneVecI8x16"](), + ReplaceLaneVecI16x8 = BinaryenObj["_BinaryenReplaceLaneVecI16x8"](), + ReplaceLaneVecI32x4 = BinaryenObj["_BinaryenReplaceLaneVecI32x4"](), + ReplaceLaneVecI64x2 = BinaryenObj["_BinaryenReplaceLaneVecI64x2"](), + ReplaceLaneVecF32x4 = BinaryenObj["_BinaryenReplaceLaneVecF32x4"](), + ReplaceLaneVecF64x2 = BinaryenObj["_BinaryenReplaceLaneVecF64x2"](), + + // ### Atomic Operations ### // + AtomicRMWAdd = BinaryenObj["_BinaryenAtomicRMWAdd"](), + AtomicRMWSub = BinaryenObj["_BinaryenAtomicRMWSub"](), + AtomicRMWAnd = BinaryenObj["_BinaryenAtomicRMWAnd"](), + AtomicRMWOr = BinaryenObj["_BinaryenAtomicRMWOr"](), + AtomicRMWXor = BinaryenObj["_BinaryenAtomicRMWXor"](), + AtomicRMWXchg = BinaryenObj["_BinaryenAtomicRMWXchg"](), + + // ### String Operations ### // + StringNewLossyUTF8Array = BinaryenObj["_BinaryenStringNewLossyUTF8Array"](), + StringNewWTF16Array = BinaryenObj["_BinaryenStringNewWTF16Array"](), + StringNewFromCodePoint = BinaryenObj["_BinaryenStringNewFromCodePoint"](), + StringMeasureUTF8 = BinaryenObj["_BinaryenStringMeasureUTF8"](), + StringMeasureWTF16 = BinaryenObj["_BinaryenStringMeasureWTF16"](), + StringEncodeLossyUTF8Array = BinaryenObj["_BinaryenStringEncodeLossyUTF8Array"](), + StringEncodeWTF16Array = BinaryenObj["_BinaryenStringEncodeWTF16Array"](), + StringEqEqual = BinaryenObj["_BinaryenStringEqEqual"](), + StringEqCompare = BinaryenObj["_BinaryenStringEqCompare"](), + + // ### Wide Arithmetic Operations ### // + AddInt128 = BinaryenObj["_BinaryenAddInt128"](), + SubInt128 = BinaryenObj["_BinaryenSubInt128"](), + MulWideSInt64 = BinaryenObj["_BinaryenMulWideSInt64"](), + MulWideUInt64 = BinaryenObj["_BinaryenMulWideUInt64"](), +} + +/** + * [description] + * @experimental + */ +export enum MemoryOrder { + Unordered = BinaryenObj["_BinaryenMemoryOrderUnordered"](), + SeqCst = BinaryenObj["_BinaryenMemoryOrderSeqCst"](), + AcqRel = BinaryenObj["_BinaryenMemoryOrderAcqRel"](), +} diff --git a/ts/test/binaryen.test.ts b/ts/test/binaryen.test.ts index 658a3b45914..f652553d470 100644 --- a/ts/test/binaryen.test.ts +++ b/ts/test/binaryen.test.ts @@ -3,6 +3,7 @@ import { suite, test, } from "node:test"; +import * as binaryen from "../src/binaryen.ts"; @@ -26,4 +27,305 @@ suite("binaryen", () => { assert.ok(__pre.BinaryenObj.printWarn); assert.ok(__pre.BinaryenObj.printErr); }); + + + test("namespace exists and has all the right top-level exports.", () => { + assert.ok(binaryen); + + // constants + assert.ok(binaryen.unreachable); + assert.ok("none" in binaryen); + assert.ok(binaryen.auto); + assert.ok(binaryen.i32); + assert.ok(binaryen.i64); + assert.ok(binaryen.f32); + assert.ok(binaryen.f64); + assert.ok(binaryen.v128); + assert.ok(binaryen.anyref); + assert.ok(binaryen.eqref); + assert.ok(binaryen.i31ref); + assert.ok(binaryen.structref); + assert.ok(binaryen.arrayref); + assert.ok(binaryen.funcref); + // @ts-expect-error + assert.ok(!binaryen.exnref); + assert.ok(binaryen.externref); + assert.ok(binaryen.nullref); + assert.ok(binaryen.nullfuncref); + // @ts-expect-error + assert.ok(!binaryen.nullexnref); + assert.ok(binaryen.nullexternref); + assert.strictEqual(binaryen.notPacked, 0); + assert.ok(binaryen.i8); + assert.ok(binaryen.i16); + assert.ok(binaryen.stringref); + + // enums + assert.strictEqual(typeof binaryen.ExpressionId, "object"); + assert.strictEqual(typeof binaryen.SideEffect, "object"); + assert.strictEqual(typeof binaryen.ExternalKind, "object"); + assert.strictEqual(typeof binaryen.Operation, "object"); + assert.strictEqual(typeof binaryen.MemoryOrder, "object"); + assert.strictEqual(typeof binaryen.Feature, "object"); + assert.strictEqual(typeof binaryen.ExpressionRunnerFlag, "object"); + + // functions + /* + assert.strictEqual(typeof binaryen.emitText, "function"); + assert.strictEqual(typeof binaryen.readBinary, "function"); + assert.strictEqual(typeof binaryen.readBinaryWithFeatures, "function"); + assert.strictEqual(typeof binaryen.parseText, "function"); + assert.strictEqual(typeof binaryen.exit, "function"); + assert.strictEqual(typeof binaryen.createType, "function"); + assert.strictEqual(typeof binaryen.expandType, "function"); + assert.strictEqual(typeof binaryen.getTypeFromHeapType, "function"); + assert.strictEqual(typeof binaryen.getHeapType, "function"); + assert.strictEqual(typeof binaryen.getExpressionId, "function"); + assert.strictEqual(typeof binaryen.getExpressionType, "function"); + assert.strictEqual(typeof binaryen.getExpressionInfo, "function"); + assert.ok(binaryen.emitText.toString().startsWith("function")); + assert.ok(binaryen.readBinary.toString().startsWith("function")); + assert.ok(binaryen.readBinaryWithFeatures.toString().startsWith("function")); + assert.ok(binaryen.parseText.toString().startsWith("function")); + assert.ok(binaryen.exit.toString().startsWith("function")); + assert.ok(binaryen.createType.toString().startsWith("function")); + assert.ok(binaryen.expandType.toString().startsWith("function")); + assert.ok(binaryen.getTypeFromHeapType.toString().startsWith("function")); + assert.ok(binaryen.getHeapType.toString().startsWith("function")); + assert.ok(binaryen.getExpressionId.toString().startsWith("function")); + assert.ok(binaryen.getExpressionType.toString().startsWith("function")); + assert.ok(binaryen.getExpressionInfo.toString().startsWith("function")); + */ + + // classes + /* + assert.strictEqual(typeof binaryen.Module, "function"); + assert.strictEqual(typeof binaryen.TypeBuilder, "function"); + assert.strictEqual(typeof binaryen.ExpressionRunner, "function"); + assert.strictEqual(typeof binaryen.Relooper, "function"); + assert.ok(binaryen.Module.toString().startsWith("class")); + assert.ok(binaryen.TypeBuilder.toString().startsWith("class")); + assert.ok(binaryen.ExpressionRunner.toString().startsWith("class")); + assert.ok(binaryen.Relooper.toString().startsWith("class")); + */ + + // other + /* + assert.ok(binaryen.settings); + assert.ok(binaryen.expressions); + */ + }); + + + test("types.", () => { + assert.strictEqual(binaryen.auto, -1); + assert.strictEqual(binaryen.none, 0); + assert.strictEqual(binaryen.unreachable, 1); + assert.strictEqual(binaryen.i32, 2); + assert.strictEqual(binaryen.i64, 3); + assert.strictEqual(binaryen.f32, 4); + assert.strictEqual(binaryen.f64, 5); + assert.strictEqual(binaryen.v128, 6); + assert.strictEqual(binaryen.anyref, 0x22); + assert.strictEqual(binaryen.eqref, 0x2a); + assert.strictEqual(binaryen.i31ref, 0x32); + assert.strictEqual(binaryen.structref, 0x3a); + assert.strictEqual(binaryen.arrayref, 0x42); + assert.strictEqual(binaryen.funcref, 0x12); + // @ts-expect-error + assert.strictEqual(binaryen.exnref, undefined); + assert.strictEqual(binaryen.externref, 0x0a); + assert.strictEqual(binaryen.nullref, 0x5a); + assert.strictEqual(binaryen.nullfuncref, 0x6a); + // @ts-expect-error + assert.strictEqual(binaryen.nullexnref, undefined); + assert.strictEqual(binaryen.nullexternref, 0x62); + assert.strictEqual(binaryen.notPacked, 0); + assert.strictEqual(binaryen.i8, 1); + assert.strictEqual(binaryen.i16, 2); + assert.strictEqual(binaryen.stringref, 0x52); + + /* + const i32_pair = binaryen.createType([binaryen.i32, binaryen.i32]); + const duplicate_pair = binaryen.createType([binaryen.i32, binaryen.i32]); + assert.strictEqual(binaryen.expandType(i32_pair).toString(), "2,2"); + assert.strictEqual(binaryen.expandType(duplicate_pair).toString(), "2,2"); + assert.strictEqual(i32_pair, duplicate_pair); + + assert.strictEqual(binaryen.expandType(binaryen.createType([binaryen.f32, binaryen.f32])).toString(), "4,4"); + */ + }); + + + test(".Feature", () => { + // NOTE: the length is twice the number of members due to how TypeScript emits enums. + assert.strictEqual(Object.entries(binaryen.Feature).length, 54); + + assert.strictEqual(binaryen.Feature.MVP, 0); + assert.strictEqual(binaryen.Feature.Atomics, 1 << 0); + assert.strictEqual(binaryen.Feature.MutableGlobals, 1 << 1); + assert.strictEqual(binaryen.Feature.NontrappingFPToInt, 1 << 2); + assert.strictEqual(binaryen.Feature.SIMD128, 1 << 3); + assert.strictEqual(binaryen.Feature.BulkMemory, 1 << 4); + assert.strictEqual(binaryen.Feature.SignExt, 1 << 5); + assert.strictEqual(binaryen.Feature.ExceptionHandling, 1 << 6); + assert.strictEqual(binaryen.Feature.TailCall, 1 << 7); + assert.strictEqual(binaryen.Feature.ReferenceTypes, 1 << 8); + assert.strictEqual(binaryen.Feature.Multivalue, 1 << 9); + assert.strictEqual(binaryen.Feature.GC, 1 << 10); + assert.strictEqual(binaryen.Feature.Memory64, 1 << 11); + assert.strictEqual(binaryen.Feature.RelaxedSIMD, 1 << 12); + assert.strictEqual(binaryen.Feature.ExtendedConst, 1 << 13); + assert.strictEqual(binaryen.Feature.Strings, 1 << 14); + assert.strictEqual(binaryen.Feature.MultiMemory, 1 << 15); + assert.strictEqual(binaryen.Feature.StackSwitching, 1 << 16); + assert.strictEqual(binaryen.Feature.SharedEverything, 1 << 17); + assert.strictEqual(binaryen.Feature.FP16, 1 << 18); + assert.strictEqual(binaryen.Feature.BulkMemoryOpt, 1 << 19); + assert.strictEqual(binaryen.Feature.CallIndirectOverlong, 1 << 20); + // @ts-expect-error + assert.strictEqual(binaryen.Feature.CustomDescriptors, undefined); assert.notStrictEqual(binaryen.Feature.CustomDescriptors, 1 << 21); + assert.strictEqual(binaryen.Feature.RelaxedAtomics, 1 << 22); + assert.strictEqual(binaryen.Feature.CustomPageSizes, 1 << 23); + // @ts-expect-error + assert.strictEqual(binaryen.Feature.Multibyte, undefined); assert.notStrictEqual(binaryen.Feature.Multibyte, 1 << 24); + assert.strictEqual(binaryen.Feature.WideArithmetic, 1 << 25); + assert.strictEqual(binaryen.Feature.CompactImports, 1 << 26); + assert.strictEqual(binaryen.Feature.All, (1 << 27) - 1); + }); + + + test(".ExpressionId", () => { + // NOTE: the length is twice the number of members due to how TypeScript emits enums. + assert.strictEqual(Object.entries(binaryen.ExpressionId).length, 170); + + assert.strictEqual(binaryen.ExpressionId.Invalid, 0); + assert.strictEqual(binaryen.ExpressionId.Block, 1); + assert.strictEqual(binaryen.ExpressionId.If, 2); + assert.strictEqual(binaryen.ExpressionId.Loop, 3); + assert.strictEqual(binaryen.ExpressionId.Break, 4); + assert.strictEqual(binaryen.ExpressionId.Switch, 5); + assert.strictEqual(binaryen.ExpressionId.Call, 6); + assert.strictEqual(binaryen.ExpressionId.CallIndirect, 7); + assert.strictEqual(binaryen.ExpressionId.LocalGet, 8); + assert.strictEqual(binaryen.ExpressionId.LocalSet, 9); + assert.strictEqual(binaryen.ExpressionId.GlobalGet, 10); + assert.strictEqual(binaryen.ExpressionId.GlobalSet, 11); + assert.strictEqual(binaryen.ExpressionId.Load, 12); + assert.strictEqual(binaryen.ExpressionId.Store, 13); + assert.strictEqual(binaryen.ExpressionId.Const, 14); + assert.strictEqual(binaryen.ExpressionId.Unary, 15); + assert.strictEqual(binaryen.ExpressionId.Binary, 16); + assert.strictEqual(binaryen.ExpressionId.Select, 17); + assert.strictEqual(binaryen.ExpressionId.Drop, 18); + assert.strictEqual(binaryen.ExpressionId.Return, 19); + assert.strictEqual(binaryen.ExpressionId.MemorySize, 20); + assert.strictEqual(binaryen.ExpressionId.MemoryGrow, 21); + assert.strictEqual(binaryen.ExpressionId.Nop, 22); + assert.strictEqual(binaryen.ExpressionId.Unreachable, 23); + assert.strictEqual(binaryen.ExpressionId.AtomicRMW, 24); + assert.strictEqual(binaryen.ExpressionId.AtomicCmpxchg, 25); + assert.strictEqual(binaryen.ExpressionId.AtomicWait, 26); + assert.strictEqual(binaryen.ExpressionId.AtomicNotify, 27); + assert.strictEqual(binaryen.ExpressionId.AtomicFence, 28); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.Pause, undefined); assert.notStrictEqual(binaryen.ExpressionId.Pause, 29); + assert.strictEqual(binaryen.ExpressionId.SIMDExtract, 30); + assert.strictEqual(binaryen.ExpressionId.SIMDReplace, 31); + assert.strictEqual(binaryen.ExpressionId.SIMDShuffle, 32); + assert.strictEqual(binaryen.ExpressionId.SIMDTernary, 33); + assert.strictEqual(binaryen.ExpressionId.SIMDShift, 34); + assert.strictEqual(binaryen.ExpressionId.SIMDLoad, 35); + assert.strictEqual(binaryen.ExpressionId.SIMDLoadStoreLane, 36); + assert.strictEqual(binaryen.ExpressionId.MemoryInit, 37); + assert.strictEqual(binaryen.ExpressionId.DataDrop, 38); + assert.strictEqual(binaryen.ExpressionId.MemoryCopy, 39); + assert.strictEqual(binaryen.ExpressionId.MemoryFill, 40); + assert.strictEqual(binaryen.ExpressionId.Pop, 41); + assert.strictEqual(binaryen.ExpressionId.RefNull, 42); + assert.strictEqual(binaryen.ExpressionId.RefIsNull, 43); + assert.strictEqual(binaryen.ExpressionId.RefFunc, 44); + assert.strictEqual(binaryen.ExpressionId.RefEq, 45); + assert.strictEqual(binaryen.ExpressionId.TableGet, 46); + assert.strictEqual(binaryen.ExpressionId.TableSet, 47); + assert.strictEqual(binaryen.ExpressionId.TableSize, 48); + assert.strictEqual(binaryen.ExpressionId.TableGrow, 49); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.TableFill, undefined); assert.notStrictEqual(binaryen.ExpressionId.TableFill, 50); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.TableCopy, undefined); assert.notStrictEqual(binaryen.ExpressionId.TableCopy, 51); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.TableInit, undefined); assert.notStrictEqual(binaryen.ExpressionId.TableInit, 52); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ElemDrop, undefined); assert.notStrictEqual(binaryen.ExpressionId.ElemDrop, 53); + assert.strictEqual(binaryen.ExpressionId.Try, 54); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.TryTable, undefined); assert.notStrictEqual(binaryen.ExpressionId.TryTable, 55); + assert.strictEqual(binaryen.ExpressionId.Throw, 56); + assert.strictEqual(binaryen.ExpressionId.Rethrow, 57); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ThrowRef, undefined); assert.notStrictEqual(binaryen.ExpressionId.ThrowRef, 58); + assert.strictEqual(binaryen.ExpressionId.TupleMake, 59); + assert.strictEqual(binaryen.ExpressionId.TupleExtract, 60); + assert.strictEqual(binaryen.ExpressionId.RefI31, 61); + assert.strictEqual(binaryen.ExpressionId.I31Get, 62); + assert.strictEqual(binaryen.ExpressionId.CallRef, 63); + assert.strictEqual(binaryen.ExpressionId.RefTest, 64); + assert.strictEqual(binaryen.ExpressionId.RefCast, 65); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.RefGetDesc, undefined); assert.notStrictEqual(binaryen.ExpressionId.RefGetDesc, 66); + assert.strictEqual(binaryen.ExpressionId.BrOn, 67); + assert.strictEqual(binaryen.ExpressionId.StructNew, 68); + assert.strictEqual(binaryen.ExpressionId.StructGet, 69); + assert.strictEqual(binaryen.ExpressionId.StructSet, 70); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.StructRMW, undefined); assert.notStrictEqual(binaryen.ExpressionId.StructRMW, 71); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.StructCmpxchg, undefined); assert.notStrictEqual(binaryen.ExpressionId.StructCmpxchg, 72); + assert.strictEqual(binaryen.ExpressionId.ArrayNew, 73); + assert.strictEqual(binaryen.ExpressionId.ArrayNewData, 74); + assert.strictEqual(binaryen.ExpressionId.ArrayNewElem, 75); + assert.strictEqual(binaryen.ExpressionId.ArrayNewFixed, 76); + assert.strictEqual(binaryen.ExpressionId.ArrayGet, 77); + assert.strictEqual(binaryen.ExpressionId.ArraySet, 78); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ArrayLoadId, undefined); assert.notStrictEqual(binaryen.ExpressionId.ArrayLoadId, 79); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ArrayStoreId, undefined); assert.notStrictEqual(binaryen.ExpressionId.ArrayStoreId, 80); + assert.strictEqual(binaryen.ExpressionId.ArrayLen, 81); + assert.strictEqual(binaryen.ExpressionId.ArrayCopy, 82); + assert.strictEqual(binaryen.ExpressionId.ArrayFill, 83); + assert.strictEqual(binaryen.ExpressionId.ArrayInitData, 84); + assert.strictEqual(binaryen.ExpressionId.ArrayInitElem, 85); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ArrayRMWId, undefined); assert.notStrictEqual(binaryen.ExpressionId.ArrayRMWId, 86); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.ArrayCmpxchgId, undefined); assert.notStrictEqual(binaryen.ExpressionId.ArrayCmpxchgId, 87); + assert.strictEqual(binaryen.ExpressionId.RefAs, 88); + assert.strictEqual(binaryen.ExpressionId.StringNew, 89); + assert.strictEqual(binaryen.ExpressionId.StringConst, 90); + assert.strictEqual(binaryen.ExpressionId.StringMeasure, 91); + assert.strictEqual(binaryen.ExpressionId.StringEncode, 92); + assert.strictEqual(binaryen.ExpressionId.StringConcat, 93); + assert.strictEqual(binaryen.ExpressionId.StringEq, 94); + // @ts-expect-error + assert.strictEqual(binaryen.ExpressionId.StringTest, undefined); assert.notStrictEqual(binaryen.ExpressionId.StringTest, 95); + assert.strictEqual(binaryen.ExpressionId.StringWTF16Get, 96); + assert.strictEqual(binaryen.ExpressionId.StringSliceWTF, 97); + + assert.strictEqual(binaryen.ExpressionId.WideIntAddSub, 106); + assert.strictEqual(binaryen.ExpressionId.WideIntMul, 107); + }); + + + test(".ExternalKind", () => { + // NOTE: the length is twice the number of members due to how TypeScript emits enums. + assert.strictEqual(Object.entries(binaryen.ExternalKind).length, 10); + + assert.strictEqual(binaryen.ExternalKind.ExternalFunction, 0); + assert.strictEqual(binaryen.ExternalKind.ExternalTable, 1); + assert.strictEqual(binaryen.ExternalKind.ExternalMemory, 2); + assert.strictEqual(binaryen.ExternalKind.ExternalGlobal, 3); + assert.strictEqual(binaryen.ExternalKind.ExternalTag, 4); + }); }); From 97a806daae97f2c3103a7763dc188938a9774704 Mon Sep 17 00:00:00 2001 From: Chris Harvey <1362083+chharvey@users.noreply.github.com> Date: Thu, 18 Jun 2026 21:30:19 -0400 Subject: [PATCH 4/4] docs: add overview --- .gitignore | 2 +- ts/docs/API-Overview.md | 591 ++++++++++++++++++++++++++++++++++++++++ ts/docs/styles.css | 8 + 3 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 ts/docs/API-Overview.md create mode 100644 ts/docs/styles.css diff --git a/.gitignore b/.gitignore index 3265d12718e..287dd0766d9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ options-pinned.h /out/ # generated documentation -docs/ +/docs/ # files related to building in-tree CMakeFiles diff --git a/ts/docs/API-Overview.md b/ts/docs/API-Overview.md new file mode 100644 index 00000000000..c177f9c6321 --- /dev/null +++ b/ts/docs/API-Overview.md @@ -0,0 +1,591 @@ +# API Overview +Please note that the Binaryen API is evolving fast. +Definitions and documentation provided by the C++ codebase don’t always immediately find their way here into TypeScript. +If you rely on Binaryen.TS and spot an issue, please consider sending a PR our way. Thank you! + +### Contents +- [Top-Level Symbols](#top-level-symbols) +- [Module Manipulation](#module-manipulation) +- [Expression Building](#expression-building) +- [Expression Manipulation](#expression-manipulation) +- [Deprecations](#️-deprecations-renames-and-moves) + + + +### Icon Legend +- ⛔️ Not yet supported, but listed here for completion. +- ❌ removed +- 🌱 new/experimental/proposed; not listed in WASM spec + + + +## Top-Level Symbols +Import `binaryen` as a namespace: +```ts +import * as binaryen from "binaryen.ts"; +``` +or import ES module components individually: +```ts +import {type Type, type ExpressionRef, i32} from "binaryen.ts"; +``` + + +### TypeScript Types +- `Type`: a WASM type; the type of the constants named `i32`, `i64`, etc. +- `HeapType`: a WASM heap type created in a `TypeBuilder` +- `PackedType`: an allowed type of a struct or array field; one of three constants: `notPacked`, `i8`, `i16` +- `ExpressionRef`: an expression, e.g. the type of `i32.const()` +- module component ref types: + - `TagRef` + - `GlobalRef` + - `MemoryRef` + - `TableRef` + - `FunctionRef` + - `DataSegmentRef` + - `ElementSegmentRef` + - ~~`ImportRef`~~ ⛔️ + - `ExportRef` + + +### Constants +- `unreachable`: type of an unreachable instruction (stack effect *[t\*] -> [t\*]*) +- `none`: void type (stack effect *[t\*] -> []*); not to be confused with WASM’s heap type called *none* +- `auto`: special type used in [`ExpressionBuilder#block()`](#expression-building) exclusively; automatically detects a block’s result type based on its contents +> +- `i32`: 32-bit integer +- `i64`: 64-bit integer +- `f32`: 32-bit float +- `f64`: 64-bit float +- `v128`: 128-bit vector (SIMD) +> +- `anyref`: *(ref null any)* +- `eqref`: *(ref null eq)* +- `i31ref`: *(ref null i31)* +- `structref`: *(ref null struct)* +- `arrayref`: *(ref null array)* +- `funcref`: *(ref null func)* +- ~~`exnref`~~: ⛔️ reserved for *(ref null exn)* +- `externref`: *(ref null extern)* +- `nullref`: *(ref null none)* +- `nullfuncref`: *(ref null nofunc)* +- ~~`nullexnref`~~: ⛔️ reserved for *(ref null noexn)* +- `nullexternref`: *(ref null noextern)* +- `stringref`: 🌱 planned for *(ref null string)* +> +- `notPacked` (`PackedType`): unaltered type in the struct/array field +- `i8` (`PackedType`): 8-bit integer +- `i16` (`PackedType`): 16-bit integer + + +### Enums +- `ExpressionId`: an enumeration of values returned by `getExpressionId()` + - a slight misnomer, as these are not unique IDs per expression, but different IDs for the “kinds” of expression +- `SideEffect`: an enumeration of values returend by `getSideEffects()` +- `ExternalKind`: an enumeration of kinds of exports; serves as type of the `Module.Export#kind` field +- `Operation`: used in [manipulating expressions](#expression-manipulation) +- `MemoryOrder`: an enumeration of values used in atomic expression methods +- `Feature`: WASM Module features +- `ExpressionRunnerFlag`: flags for the `ExpressionRunner` class + + +### Global Bindings +Classes (see generated docs for descriptions): +- `Module` +- `TypeBuilder` +- `ExpressionRunner` +- `Relooper` + +Functions (see generated docs for descriptions): +- `emitText(expr: ExpressionRef): string` +- `readBinary(data: Uint8Array): Module` +- `readBinaryWithFeatures(data: Uint8Array, features: Feature): Module` +- `parseText(text: string): Module` +- `exit(status: number): void` +- `createType(types: readonly Type[]): Type` +- `expandType(typ: Type): Type[]` +- `getTypeFromHeapType(heapType: HeapType, nullable: boolean): Type` +- `getHeapType(typ: Type): HeapType` +- `getExpressionId(expr: ExpressionRef): ExpressionId` +- `getExpressionType(expr: ExpressionRef): Type` +- `getExpressionInfo(expr: ExpressionRef): Expression` + +Objects: +- `settings`: global settings manager; see `SettingsService` docs + + + +## Module Manipulation +Properties of `Module` as a namespace: +- `new Module.Tag(ref: TagRef)`: an object containing information about a **Tag** +- `new Module.Global(ref: GlobalRef)`: an object containing information about a **Global** +- `new Module.Memory(mod: Module, name: string)`: an object containing information about a **Memory** +- `new Module.Table(ref: TableRef)`: an object containing information about a **Table** +- `new Module.Function(ref: FunctionRef)`: an object containing information about a **Function** +- `new Module.DataSegment(mod: Module, ref: DataSegmentRef)`: an object containing information about a **Data Segment** +- `new Module.ElementSegment(ref: ElementSegmentRef)`: an object containing information about an **Element Segment** +- `new Module.Import()`: an object containing information about an **Import** (🌱 empty for now) +- `new Module.Export(ref: ExportRef)`: an object containing information about an **Export** + +Properties of `Module` instances (see full list of methods in generated docs): +- `Module#wasm`: [build WASM expressions](#expression-building) +- `Module#start`: get/set the start function +- `Module#features`: get/set WASM features (a bitmask) +> +- `Module#tags`: **Tag** manipulation +- `Module#globals`: **Global** manipulation +- `Module#memories`: **Memory** manipulation +- `Module#tables`: **Table** manipulation +- `Module#functions`: **Function** manipulation +- `Module#dataSegments`: **Data Segment** manipulation +- `Module#elementSegments`: **Element Segment** manipulation +- `Module#imports`: **Import** manipulation +- `Module#exports`: **Export** manipulation + +Module methods (see signatures and descriptions in generated docs): +- Expression Manipulation + - `.pop()` + - `.getSideEffects()` + - `.copyExpression()` +- Emission & Execution + - `.emitText()` + - `.emitStackIR()` + - `.emitAsmjs()` + - `.emitBinary()` + - `.interpret()` + - `.dispose()` +- Validation & Optimization + - `.validate()` + - `.optimize()` + - `.optimizeFunction()` + - `.runPasses()` + - `.runPassesOnFunction()` +- Debugging + - `.addDebugInfoFileName()` + - `.getDebugInfoFileName()` + - `.setDebugLocation()` + - `.setTypeName()` + - `.setFieldName()` + - `.addCustomSection()` + - `.updateMaps()` + + + +## Expression Building +Each of these functions is bound to `Module#wasm` (of type `ExpressionBuilder`) and returns an `ExpressionRef`. +See the generated **ExpressionBuilder** docs for all available functions and details. + +Note: For brevity, glob-like syntax `_{s,u}` is used to mean “`_s` and `_u`”. + +- parametrics + - `.nop()` + - `.unreachable()` + - `.drop()` + - `.select()` +- conditionals, blocks, loops, and breaking (“branching”) + - `.block()` + - `.loop()` + - `.if()` + - `.br()`, `.br_if()`, `.br_table()` + - `.br_on_null()`, `.br_on_non_null()`, `.br_on_cast()`, `.br_on_cast_fail()` +- function calls, returns, throws, and catching + - `.call()`, `.call_ref()`, `.call_indirect()` + - `.return()`, `.return_call()`, `.return_call_ref()`, `.return_call_indirect()` + - `.throw()`, `.throw_ref()`, `.try_table()` + - ~~`.catch()`, `.catch_ref()`, `.catch_all()`, `.catch_all_ref()`~~; ⛔️ not yet supported +- local and global variables + - `.local.get()` + - `.local.set()` + - `.local.tee()` + - `.global.get()` + - `.global.set()` +- tables and memories + - `.table.get()`, `.table.set()`, `.table.size()`, `.table.grow()` + - ~~`.table.fill()`, `.table.copy()`, `table.init()`~~; ⛔️ not yet supported + - `.memory.size()`, `.memory.grow()`, `.memory.fill()`, `.memory.copy()`, `.memory.init()`, + - ~~`.elem.drop()`~~; ⛔️ not yet supported + - `.data.drop()` +- references + - `.ref.func()`, `.ref.null()`, `.ref.is_null()`, `.ref.as_non_null()`, `.ref.eq()`, `.ref.test()`, `.ref.cast()` + - `.ref.i31()`, `i31.get_{s,u}()` + - ~~`.extern.convert_any()`, `.any.convert_extern()`~~; ⛔️ not yet supported +- tuples 🌱 (Binaryen-specific) + - `.tuple.make()` + - `.tuple.extract()` +- structs and arrays + - `.struct.new()`, `.struct.new_default()` + - `.struct.get()`, `.struct.get_{s,u}()` + - `.struct.set()` + - `.array.new()`, `.array.new_default()`, `.array.new_fixed()`, `.array.new_data()`, `.array.new_elem()` + - `.array.get()`, `.array.get_{s,u}()` + - `.array.set()` + - `.array.len()` + - `.array.fill()` + - `.array.copy()` + - `.array.init_data()`, `.array.init_elem()` +- integers + - `.{i32,i64}.load()`, `.{i32,i64}.load8_{s,u}()`, `.{i32,i64}.load16_{s,u}()`, `.i64.load32_{s,u}()` + - `.{i32,i64}.store()`, `.{i32,i64}.store8()`, `.{i32,i64}.store16()`, `.i64.store32()` + - `.{i32,i64}.const()` + - `.{i31,i32}.clz()`, `.{i32,i64}.ctz()`, `.{i32,i64}.popcnt()` + - `.{i32,i64}.extend8_s()`, `.{i32,i64}.extend16_s()`, `.i64.extend32_s()` + - `.{i31,i32}.add()`, `.{i32,i64}.sub()`, `.{i32,i64}.mul()`, `.{i31,i32}.div_{s,u}()`, `.{i32,i64}.rem_{s,u}()` + - `.{i31,i32}.and()`, `.{i32,i64}.or()`, `.{i32,i64}.xor()`, `.{i31,i32}.shl()`, `.{i31,i32}.shr{s,u}()`, `.{i32,i64}.rotl()`, `.{i32,i64}.rotr()` + - `.{i32,i64}.eqz()` + - `.{i32,i64}.eq()`, `.{i32,i64}.ne()` + - `.{i32,i64}.lt_{s,u}()`, `.{i32,i64}.gt_{s,u}()`, `.{i32,i64}.le_{s,u}()`, `.{i32,i64}.ge_{s,u}()` + - `.i32.wrap_i64()`, `.i64.extend_i32_{s,u}()` + - `.i32.trunc_f32_{s,u}()`, `.i32.trunc_f64_{s,u}()` + - `.i64.trunc_f32_{s,u}()`, `.i64.trunc_f64_{s,u}()` + - `.i32.trunc_sat_f32_{s,u}()`, `.i32.trunc_sat_f64_{s,u}()` + - `.i64.trunc_sat_f32_{s,u}()`, `.i64.trunc_sat_f64_{s,u}()` + - `.i32.reinterpret_f32()`, `.i64.reinterpret_f64()` + - 🌱 WideInt proposal: `.add128()`, `.sub128()`, `.mul_wide_{s,u}()` +- floats + - `.{f32,f64}.load()`, `.{f32,f64}.store()` + - `.{f32,f64}.const()` + - `.{f32,f64}.abs()`, `.{f32,f64}.neg()`, `.{f32,f64}.sqrt()`, `.{f32,f64}.ceil()`, `.{f32,f64}.floor()`, `.{f32,f64}.trunc()`, `.{f32,f64}.nearest()` + - `.{f32,f64}.add()`, `.{f32,f64}.sub()`, `.{f32,f64}.mul()`, `.{f32,f64}.div()`, `.{f32,f64}.min()`, `.{f32,f64}.max()`, `.{f32,f64}.copysign()` + - `.{f32,f64}.eq()`, `.{f32,f64}.lt()`, `.{f32,f64}.gt()`, `.{f32,f64}.le()`, `.{f32,f64}.ge()` + - `.{f32,f64}.convert_i32_s()`, `.{f32,f64}.convert_i32_u()`, `.{f32,f64}.convert_i64_s()`, `.{f32,f64}.convert_i64_u()` + - `.f32.demote_f64()`, `.f64.promote_f32()` +- vectors + - `.v128.load()` + - `.v128.load{8x8,16x4,32x2}_{s,u}()` + - `.v128.load{8,16,32,64}_splat()` + - `.v128.load{32,64}_zero()` + - `.v128.load{8,16,32,64}_lane()` + - `.v128.store()` + - `.v128.store{8,16,32,64}_lane()` + - `.v128.const()` + - `.v128.not()` + - `.v128.and()`, `.v128.andnot()`, `.v128.or()`, `.v128.xor()` + - `.v128.bitselect()` + - `.v128.anytrue()` +- SIMD ints + - `.{i8x16,i16x8,i32x4,i64x2}.abs()`, `.{i8x16,i16x8,i32x4,i64x2}.neg()`, `.i8x16.popcnt()` + > + - `.{i8x16,i16x8,i32x4,i64x2}.add()` + - `.{i8x16,i16x8,i32x4,i64x2}.sub()` + - `.{i8x16,i16x8}.add_sat_{s,u}()` + - `.{i8x16,i16x8}.sub_sat_{s,u}()` + - `.{i16x8,i32x4,i64x2}.mul()` + - `.{i8x16,i16x8}.avgr_u()` + - `.i16x8.q15mulr_sat_s()` + - ~~`.i16x8.relaxed_q15mulr_s()`~~; ⛔️ not yet supported + - `.{i8x16,i16x8,i32x4}.min{s,u}()` + - `.{i8x16,i16x8,i32x4}.max{s,u}()` + > + - ~~`.{i8x16,i16x8,i32x4,i64x2}.relaxed_laneselect()`~~; ⛔️ not yet supported + - `.{i8x16,i16x8,i32x4,i64x2}.all_true()` + - `.{i8x16,i16x8,i32x4,i64x2}.eq()` + - `.{i8x16,i16x8,i32x4,i64x2}.ne()` + - `.{i8x16,i16x8,i32x4}.lt_{s,u}()`, `.i64x2.lt_s()` + - `.{i8x16,i16x8,i32x4}.gt_{s,u}()`, `.i64x2.gt_s()` + - `.{i8x16,i16x8,i32x4}.le_{s,u}()`, `.i64x2.le_s()` + - `.{i8x16,i16x8,i32x4}.ge_{s,u}()`, `.i64x2.ge_s()` + > + - `.{i8x16,i16x8,i32x4,i64x2}.shl()` + - `.{i8x16,i16x8,i32x4,i64x2}.shr{s,u}()` + - `.{i8x16,i16x8,i32x4,i64x2}.bitmask()` + - `.i8x16.swizzle()` + - ~~`.i8x16.relaxed_swizzle()`~~; ⛔️ not yet supported + - `.i8x16.shuffle()` + > + - `.i16x8.extadd_pairwise_i8x16_{s,u}()`, `.i32x4.extadd_pairwise_i16x8_{s,u}()` + - `.i16x8.extmul_{low,high}_i8x16_{s,u}()`, `.i32x4.extmul_{low,high}_i16x8_{s,u}()`, `.i64x2.extmul_{low,high}_i32x4_{s,u}()` + - `.i32x4.dot_i16x8_s()` + - ~~`.i16x8.relaxed_dot_i8x16_i7x16_s()`~~; ⛔️ not yet supported + - ~~`.i32x4.relaxed_dot_i8x16_i7x16_add_s()`~~; ⛔️ not yet supported + - `.i8x16.narrow_i16x8_{s,u}()`, `.i16x8.narrow_i32x4_{s,u}()` + > + - `.i16x8.extend_{low,high}_i8x16_{s,u}()`, `.i32x4.extend_{low,high}_i16x8_{s,u}()`, `.i64x2.extend_{low,high}_i32x4_{s,u}()` + - `.i32x4.trunc_sat_f32x4_{s,u}()`, `.i32x4.trunc_sat_f64x2_{s,u}_zero()` + - ~~`.i32x4.relaxed_trunc_f32x4_{s,u}()`, `.i32x4.relaxed_trunc_f64x2_{s,u}_zero()`~~; ⛔️ not yet supported +- SIMD floats + - `.{f32x4,f64x2}.abs()`, `.{f32x4,f64x2}.neg()`, `.{f32x4,f64x2}.sqrt()`, `.{f32x4,f64x2}.ceil()`, `.{f32x4,f64x2}.floor()`, `.{f32x4,f64x2}.trunc()`, `.{f32x4,f64x2}.nearest()` + - `.{f32x4,f64x2}.add()`, `.{f32x4,f64x2}.sub()`, `.{f32x4,f64x2}.mul()`, `.{f32x4,f64x2}.div()`, `.{f32x4,f64x2}.min()`, `.{f32x4,f64x2}.max()`, `.{f32x4,f64x2}.pmin()`, `.{f32x4,f64x2}.pmax()` + - ~~`.{f32x4,f64x2}.relaxed_min()`, `.{f32x4,f64x2}.relaxed_max()`~~; ⛔️ not yet supported + - ~~`.{f32x4,f64x2}.relaxed_madd()`, `.{f32x4,f64x2}.relaxed_nmadd()`~~; ⛔️ not yet supported + - `.{f32x4,f64x2}.eq()`, `.{f32x4,f64x2}.ne()`, `.{f32x4,f64x2}.lt()`, `.{f32x4,f64x2}.gt()`, `.{f32x4,f64x2}.le()`, `.{f32x4,f64x2}.ge()` + - `.f32x4.convert_i32x4_{s,u}()`, `.f64x2.convert_low_i32x4_{s,u}()` + - `.f32x4.demote_f64x2_zero()`, `.f64x2.promote_low_f32x4()` +- SIMD vectors + - `.{i8x16,i16x8,i32x4,i64x2,f32x4,f64x2}.splat()` + - `.{i8x16,i16x8}.extract_lane_{s,u}()`, `.{i32x4,i64x2,f32x4,f64x2}.extract_lane()` + - `.{i8x16,i16x8,i32x4,i64x2,f32x4,f64x2}.replace_lane()` + + + +## Expression Manipulation +Expression info classes all live under the global `expressions` namespace. +They can be used to inspect and manipulate expressions. +See generated docs for fields, methods, and descriptions of each. + +- `expressions.Expression` (root class) +- Parametric Expressions + - `expressions.Drop` + - `expressions.Select` +- Control Expressions + - `expressions.Block` + - `expressions.Loop` + - `expressions.If` + - `expressions.Break` + - `expressions.Switch` + - `expressions.BrOn` + - `expressions.Call` + - `expressions.CallRef` + - `expressions.CallIndirect` + - `expressions.Return` + - `expressions.Throw` + - `expressions.Rethrow` + - `expressions.Try` +- Variable Expressions + - `expressions.LocalGet` + - `expressions.LocalSet` + - `expressions.GlobalGet` + - `expressions.GlobalSet` +- Table Expressions + - `expressions.TableGet` + - `expressions.TableSet` + - `expressions.TableSize` + - `expressions.TableGrow` +- Memory Expressions + - `expressions.Load` + - `expressions.Store` + - `expressions.SIMDLoad` + - `expressions.SIMDLoadStoreLane` + - `expressions.MemorySize` + - `expressions.MemoryGrow` + - `expressions.MemoryFill` + - `expressions.MemoryCopy` + - `expressions.MemoryInit` + - `expressions.DataDrop` +- Reference Expressions + - `expressions.RefFunc` + - `expressions.RefIsNull` + - `expressions.RefAs` + - `expressions.RefEq` + - `expressions.RefTest` + - `expressions.RefCast` + - `expressions.RefI31` + - `expressions.I31Get` +- Aggregate Expressions + - `expressions.TupleMake` + - `expressions.TupleExtract` + - `expressions.StructNew` + - `expressions.StructGet` + - `expressions.StructSet` + - `expressions.ArrayNew` + - `expressions.ArrayNewFixed` + - `expressions.ArrayNewData` + - `expressions.ArrayNewElem` + - `expressions.ArrayGet` + - `expressions.ArraySet` + - `expressions.ArrayLen` + - `expressions.ArrayFill` + - `expressions.ArrayCopy` + - `expressions.ArrayInitData` + - `expressions.ArrayInitElem` +- Numeric Expressions + - `expressions.Const` + - `expressions.Unary` + - `expressions.Binary` + - `expressions.WideIntAddSub` + - `expressions.WideIntMul` +- Vector Expressions + - `expressions.SIMDTernary` + - `expressions.SIMDShift` + - `expressions.SIMDShuffle` + - `expressions.SIMDExtract` + - `expressions.SIMDReplace` +- Atomic Expressions + - `expressions.AtomicRMW` + - `expressions.AtomicCmpxchg` + - `expressions.AtomicWait` + - `expressions.AtomicNotify` + - `expressions.AtomicFence` +- String Expressions + - `expressions.StringNew` + - `expressions.StringConst` + - `expressions.StringMeasure` + - `expressions.StringEncode` + - `expressions.StringConcat` + - `expressions.StringEq` + - `expressions.StringWTF16Get` + - `expressions.StringSliceWTF` + + + +## ⚠️ Deprecations, Renames, and Moves +### Deprecation Roadmap +This section lists all bindings that have been deprecated in favor of another binding name or its relocation. +These deprecations are marked with `/** @deprecated */` doc-comments so they can be picked up by intellisense and linting tools. + +Additionally, most of these bindings log a warning to the console notifying their deprecation and what they should be replaced with. +E.g., when running the code, you’ll see the following in standard output: +> "`.returnCall()` is deprecated; use `.return_call()` instead." + +1. For the time being, we’ll leave these deprecations in place with their runtime warnings. +2. In a future major version of Binaryen.TS, we’ll convert from logging strings to logging actual `Error` objects (with stacks), +which are more verbose and should be more attention-grabbing. +These messages will be sent to the ‘error’ output instead of ‘standard’. +3. Then in another release we’ll resort to *throwing* the error instead of just logging it. +This will be a breaking change; at this stage the deprecations should be considered **obsolete** +and this serves as a final warning that they will be removed soon. +4. Then in yet another release we’ll remove all deprecations. + +### Enums and Types +Enum names have been singularized. +- `ExpressionIds` → `ExpressionId` +- `SideEffects` → `SideEffect` +- `ExternalKinds` → `ExternalKind` +- `Features` → `Feature` + +`*Info` types have been merged with their respective classes in the `Module` namespace. +- `TagInfo` → `Module.Tag` +- `GlobalInfo` → `Module.Global` +- `MemoryInfo` → `Module.Memory` +- `TableInfo` → `Module.Table` +- `FunctionInfo` → `Module.Function` +- `MemorySegmentInfo` → `Module.DataSegment` +- `ElementSegmentInfo` → `Module.ElementSegment` +- `ExportInfo` → `Module.Export` + +`ExpressionInfo` and related types are now classes in the `expressions` namespace: +- `ExpressionInfo` → `expressions.Expression` +- `BlockInfo` → `expressions.Block` +- `LoopInfo` → `expressions.Loop` +- `IfInfo` → `expressions.If` +- etc. + + +### Modules +Module components previously at the top level have been moved under the `Module` namespace. +- `Function` → `Module.Function` +- `Table` → `Module.Table` + +Most `get*Info()` functions have been replaced by their corresponding class constructors. +- `getTagInfo(tag)` → `new Module.Tag(tag)`; +- `getGlobalInfo(global)` → `new Module.Global(global)` +- `getTableInfo(table)` → `new Module.Table(table)` +- `getFunctionInfo(func)` → `new Module.Function(func)` +- `getMemorySegmentInfo(segment)` → `new Module.DataSegment(segment)` +- `getElementSegmentInfo(segment)` → `new Module.ElementSegment(segment)` +- `getExportInfo(xport)` → `new Module.Export(xport)` +> +- `Module#getMemoryInfo(name)` has not changed. +- `Module#getDataSegmentInfo(name)` has not changed. +- global `getExpressionInfo(expr)` has not changed. + +Most of the `Module` class’s instance methods relating to module component manipulation have been moved. +- `Module#addTag()` → `Module#tags.add()` +- `Module#setGlobal()` → `Module#globals.set()` +- `Module#removeTable()` → `Module#tables.remove()` +- etc. Generally, the pattern is as follows (where `Thing` and `things` are component types (globals, tables, functions, etc.)): + - `Module#addThing()` → `Module#things.add()` + - `Module#getThing()` → `Module#things.get()` + - `Module#getThingByIndex()` → `Module#things.getByIndex()` + - `Module#getNumThings()` → `Module#things.count()` + - `Module#removeThing()` → `Module#things.remove()` + - `Module#addThingImport()` → `Module#imports.addThing()` + - `Module#addThingExport()` → `Module#exports.addThing()` + +Some of `Module`’s instance methods have been converted into getters/setters: +- `Module#getStart()` → `Module#start` +- `Module#setStart()` → `Module#start` +- `Module#getFeatures()` → `Module#features` +- `Module#setFeatures()` → `Module#features` + +Global `getSideEffects(expr, mod)` has been moved to `Module#getSideEffects()` where it lives alongside `Module#copyExpression()`. + +All expression creation methods (`.nop()`, `.drop()`, `.block()`, `.call()`, etc.) directly on `Module` +were functions for building expressions, and have migrated to `Module#wasm`, an [Expression Builder](#expression-building). + +All “type” properties (`.i32`, `.i64`, etc) on `Module` previously served as namespaces containing similar functions. +(E.g., `Module#i32.add()` produced an `(i32.add)` WASM instruction.) These also have all migrated to `Module#wasm`. + +These “type” properties also each contained its own `.pop()` method, which didn’t build a WASM expression, +but was a pseudo-instruction enabling Binaryen to reason about multiple values on the stack. +They have been combined into one method on Module, `Module#pop(t: Type)`, where `t` is one of the corresponding type namespaces. + + +### Expression Builder Methods +These methods were previously directly on the `Module` class, and have been moved to `Module#wasm`. +Some of them have also been renamed to align with the WASM spec. + +Note: To improve readability, assume all methods written in this section are bound to an Expression Builder (an object returned by `Module#wasm`). + +- `.break()` → `.br()` +- `.switch()` → `.br_table()` +- `.callIndirect()` → `.call_indirect()` +- `.returnCall()` → `.return_call()` +- `.returnCallIndirect()` → `.return_call_indirect()` +- `.rethrow()` → `.throw_ref()` +- `.try()` → `.try_table()` + +`.{struct,array}.get()` no longer take the `isSigned` argument. For packed signed/unsigned types, use `.{struct,array}.get_{s,u}()` respectively. + +Many numeric methods have been renamed: +- `.i32.wrap()` → `.i32.wrap_i64()` +- `.i32.trunc_s.f32()` → `.i32.trunc_f32_s()` +- `.i32.trunc_s.f64()` → `.i32.trunc_f64_s()` +- `.i32.trunc_u.f32()` → `.i32.trunc_f32_u()` +- `.i32.trunc_u.f64()` → `.i32.trunc_f64_u()` +- `.i32.trunc_s_sat.f32()` → `.i32.trunc_sat_f32_s()` +- `.i32.trunc_s_sat.f64()` → `.i32.trunc_sat_f64_s()` +- `.i32.trunc_u_sat.f32()` → `.i32.trunc_sat_f32_u()` +- `.i32.trunc_u_sat.f64()` → `.i32.trunc_sat_f64_u()` +- `.i32.reinterpret()` → `.i32.reinterpret_f32()` +> +- `.i64.extend_s()` → `.i64.extend_i32_s()` +- `.i64.extend_u()` → `.i64.extend_i32_u()` +- `.i64.trunc_s.f32()` → `.i64.trunc_f32_s()` +- `.i64.trunc_s.f64()` → `.i64.trunc_f64_s()` +- `.i64.trunc_u.f32()` → `.i64.trunc_f32_u()` +- `.i64.trunc_u.f64()` → `.i64.trunc_f64_u()` +- `.i64.trunc_s_sat.f32()` → `.i64.trunc_sat_f32_s()` +- `.i64.trunc_s_sat.f64()` → `.i64.trunc_sat_f64_s()` +- `.i64.trunc_u_sat.f32()` → `.i64.trunc_sat_f32_u()` +- `.i64.trunc_u_sat.f64()` → `.i64.trunc_sat_f64_u()` +- `.i64.reinterpret()` → `.i64.reinterpret_f64()` +> +- `.f32.convert_s.i32()` → `.f32.convert_i32_s()` +- `.f32.convert_s.i64()` → `.f32.convert_i64_s()` +- `.f32.convert_u.i32()` → `.f32.convert_i32_u()` +- `.f32.convert_u.i64()` → `.f32.convert_i64_u()` +- `.f32.reinterpret()` → `.f32.reinterpret_i32()` +- `.f32.demote()` → `.f32.demote_f64()` +> +- `.f64.convert_s.i32()` → `.f64.convert_i32_s()` +- `.f64.convert_s.i64()` → `.f64.convert_i64_s()` +- `.f64.convert_u.i32()` → `.f64.convert_i32_u()` +- `.f64.convert_u.i64()` → `.f64.convert_i64_u()` +- `.f64.reinterpret()` → `.f64.reinterpret_i64()` +- `.f64.promote()` → `.f64.promote_f32()` + + +### Settings +All optimization pass settings have been moved to the global `settings` object. + +- The functions starting with `get`/`set` with zero/one argument have been converted to getters/setters respectively. + - `{get,set}OptimizeLevel()` → `settings.optimizeLevel` + - `{get,set}ShrinkLevel()` → `settings.shrinkLevel` + - `{get,set}DebugInfo()` → `settings.debugInfo` + - `{get,set}TrapsNeverHappen()` → `settings.trapsNeverHappen` + - `{get,set}ClosedWorld()` → `settings.closedWorld` + - `{get,set}LowMemoryUnused()` → `settings.lowMemoryUnused` + - `{get,set}ZeroFilledMemory()` → `settings.zeroFilledMemory` + - `{get,set}FastMath()` → `settings.fastMath` + - `{get,set}GenerateStackIR()` → `settings.generateStackIR` + - `{get,set}OptimizeStackIR()` → `settings.optimizeStackIR` + - `{get,set}AlwaysInlineMaxSize()` → `settings.alwaysInlineMaxSize` + - `{get,set}FlexibleInlineMaxSize()` → `settings.flexibleInlineMaxSize` + - `{get,set}OneCallerInlineMaxSize()` → `settings.oneCallerInlineMaxSize` + - `{get,set}AllowInliningFunctionsWithLoops()` → `settings.allowInliningFunctionsWithLoops` +- Other functions have only been moved. + - `getPassArgument()` → `settings.getPassArgument()` + - `setPassArgument()` → `settings.setPassArgument()` + - `clearPassArguments()` → `settings.clearPassArguments()` + - `hasPassToSkip()` → `settings.hasPassToSkip()` + - `addPassToSkip()` → `settings.addPassToSkip()` + - `clearPassesToSkip()` → `settings.clearPassesToSkip()` diff --git a/ts/docs/styles.css b/ts/docs/styles.css new file mode 100644 index 00000000000..5730302c617 --- /dev/null +++ b/ts/docs/styles.css @@ -0,0 +1,8 @@ +.deprecated { + --color-text: gray; + color: var(--color-text); +} + +#wasm ~ :is(.tsd-signature, .tsd-type-declaration) { + display: none; +}