3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00
z3/src/api/js
Nikolaj Bjorner 04b0b3690d js
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-07 12:46:52 -07:00
..
scripts js 2022-05-07 12:46:52 -07:00
src wasm build: disable error handler (#5996) 2022-04-24 11:04:08 +01:00
build-wasm.sh Add WebAssembly/TypeScript bindings (#5762) 2022-01-09 17:16:38 -08:00
example-raw.ts automatically release wasm build (#5997) 2022-04-24 18:06:36 +01:00
package-lock.json Add WebAssembly/TypeScript bindings (#5762) 2022-01-09 17:16:38 -08:00
package.json wasm build: disable error handler (#5996) 2022-04-24 11:04:08 +01:00
PUBLISHED_README.md wasm build: disable error handler (#5996) 2022-04-24 11:04:08 +01:00
README.md Add WebAssembly/TypeScript bindings (#5762) 2022-01-09 17:16:38 -08:00
test-ts-api.ts wasm build: disable error handler (#5996) 2022-04-24 11:04:08 +01:00
tsconfig.json Add WebAssembly/TypeScript bindings (#5762) 2022-01-09 17:16:38 -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.

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.

Tests

Current tests are very minimal: test-ts-api.ts contains a couple real cases translated very mechanically from this file.