zig-js-glue v0.1.3
zig-js Glue
This is the JS library that glues with the Zig library so that Zig can communicate with the host JS environment when compiled to WebAssembly. Learn more about the zig-js library at the zig-js repository.
Installation
There are two methods for using the JS side of zig-js:
This library is a standard npm package, so you can install and use it as you normally would any other package. Add it to your package.json and integrate it with the bundler you're already using.
You can run
npm run build
in this directory and the library will be bundled into a single JS file indist/
. You can then copy the single JS file into your web project. We bundle both a normal CJS module atdist/index.js
as well as an ES module atdist/module.js
. TypeScript type definitions are available indist/types.d.ts
.