{"library":"zig-build","type":"library","category":null,"description":"zig-build, currently at version 0.3.0, is a modern library designed for building and cross-compiling Node.js native addons, with a strong focus on Node-API (N-API). It differentiates itself from traditional tools like node-gyp and cmake-js by directly leveraging the Zig compiler and its Clang wrapper, eliminating the need for system compilers. This approach enables first-class cross-compilation, automatic build caching, and static linking of libc++. The library exclusively supports N-API addons, intentionally deprecating legacy NAN addons, and does not handle native addon downloading at install time. Instead, it promotes the use of npm's `optionalDependencies` combined with `os`/`cpu` specific packages for improved user experience and reduced runtime dependencies. `zig-build` functions as a library within a JavaScript or TypeScript build script, providing configuration flexibility. The release cadence is currently irregular, characteristic of a rapidly evolving project in its early stages.","language":"javascript","status":"active","version":"0.3.0","tags":["javascript","native","addon","bindings","napi","node-api","c","c++","zig","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install zig-build","imports":["import { build } from 'zig-build'"]},{"cmd":"yarn add zig-build","imports":[]},{"cmd":"pnpm add zig-build","imports":[]}],"homepage":"https://zig-build.com","github":"https://github.com/solarwindscloud/zig-build","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/zig-build","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/zig-build/compatibility"}}