3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-20 01:03:20 +00:00
z3/src/api/js
Copilot 1be52d95a5
Add benchmark export to C# and TypeScript APIs (#8228)
* Initial plan

* Add benchmark export functionality to C# and TypeScript APIs

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Fix TypeScript build error: remove redundant array length parameter

The Z3 TypeScript wrapper auto-generates array length parameters from the array itself, so passing assumptions.length explicitly causes a parameter count mismatch. Removed the redundant parameter.

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-01-17 13:02:19 -08:00
..
examples Add RCF (Real Closed Field) bindings to C++, Java, C#, and TypeScript (#8171) 2026-01-12 16:34:42 -08:00
scripts Add TypeScript API parity: Solver introspection, congruence closure, and Model sort universe methods (#8129) 2026-01-09 09:03:53 -08:00
src Add benchmark export to C# and TypeScript APIs (#8228) 2026-01-17 13:02:19 -08:00
.nvmrc Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
.prettierrc.json Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
jest.config.js Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
package-lock.json Add GitHub Actions workflow to publish JavaScript/TypeScript API documentation (#8084) 2025-12-15 22:57:46 +00:00
package.json Update emscripten (#7473) 2024-12-06 18:11:14 -08:00
PUBLISHED_README.md Remove usages of Z3_bool, just use bool. 2022-07-30 05:49:05 +02:00
README.md Update emscripten (#7473) 2024-12-06 18:11:14 -08:00
tsconfig.build.json Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
tsconfig.json Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
typedoc.json Add high level bindings for js (#6048) 2022-06-14 09:55:58 -07:00
TYPESCRIPT_API_ENHANCEMENTS.md Add Simplifier, Params, and ParamDescrs APIs to TypeScript bindings (#8146) 2026-01-10 19:44:24 -08:00

TypeScript Bindings

This directory contains JavaScript code to automatically derive TypeScript bindings for the C API, which are published on npm as z3-solver.

The readme for the bindings themselves is located in PUBLISHED_README.md.

Building

You'll need to have emscripten set up, along with all of its dependencies. The easiest way to do that is with emsdk. Newer versions of emscripten may break the build; you can find the version used in CI in this file.

Then run npm i to install dependencies, npm run build:ts to build the TypeScript wrapper, and npm run build:wasm to build the wasm artifact.

Build on your own

Consult the file build-wasm.ts for configurations used for building wasm.

Tests

Run npm test after building to run tests.