Description
Zigar is a toolkit that lets JavaScript and PHP projects use code written in Zig. It marshals calls in both directions, so Zig functions can be called from JavaScript or PHP and the reverse, and it gives access to all Zig data types. It also includes async task management, threads in native code and WebAssembly, and emulation of file system operations. The toolkit runs on macOS, Linux and Windows, in both 64-bit and 32-bit builds. For native code it supports Node.js, Bun.js, Electron and NW.js, and for browser and bundler builds it supports WebAssembly with Webpack, Rollup and Vite. The project wiki holds the documentation. The site also has tutorials for a hello world example, a SHA-1 digest, image processing and an HTTP server, each with steps for several runtimes or bundlers, plus a Lua interpreter example. Web demos show image and video filters and rendering in the browser. Some demos use WebAssembly threads, which older browsers may not support.…
Highlights
- Call Zig code from JavaScript and PHP
- Native code on Node.js, Bun, Electron and NW.js
- WebAssembly builds for Webpack, Rollup and Vite
- Threads and async task management
- Tutorials and browser demos
Ratings & Reviews
No ratings yet
Be the first to rate Zigar.
People also visit
Zigar FAQ
What is Zigar?
A toolkit for using Zig code in JavaScript and PHP projects.
Which platforms are supported?
macOS, Linux and Windows, in 64-bit and 32-bit. Native code runs on Node.js, Bun.js, Electron and NW.js, and WebAssembly works with Webpack, Rollup and Vite.
Where is the documentation?
In the project wiki, with tutorials for hello world, SHA-1 digests, image processing and an HTTP server.
Do the browser demos need anything special?
Some use WebAssembly threads, which may not be available in older browsers.
Is it open source?
Yes. The source is public on GitHub at chung-leong/zigar.
What are the best Zigar alternatives?
Popular alternatives to Zigar include Rzweb, Kyushu and Czkawka Tauri. See all Zigar alternatives



