rzig: Safe Zig Bindings

Scaffolds packages backed by Zig and generates a safe native boundary for plain Zig functions. The generated integration converts objects at the language boundary, registers native routines, propagates errors, and compiles across platforms without requiring C++. Each step of the workflow is a function: locating a supported Zig compiler, scaffolding the package, scanning the Zig source for exported functions, rendering and writing the bindings, checking the package before compilation, and building it with the compiler errors reported by file and line. The scan, the checks and the generated bindings are pure R; a Zig compiler is needed only to build a package created with the scaffold.

Version: 1.0.0
Suggests: digest, knitr, pkgload, rmarkdown, roxygen2, testthat (≥ 3.0.0), yaml
Published: 2026-10-22
DOI: 10.32614/CRAN.package.rzig
Author: Marek Deja ORCID iD [aut, cre]
Maintainer: Marek Deja <marek.deja at uj.edu.pl>
BugReports: https://github.com/MarekDejaUJ/rzig/issues
License: GPL-3
URL: https://marekdejauj.github.io/rzig/, https://github.com/MarekDejaUJ/rzig
NeedsCompilation: no
SystemRequirements: Zig 0.16.x or 0.17.x (https://ziglang.org/download/), needed to install packages created with rzig
Materials: README, NEWS
CRAN checks: rzig results

Documentation:

Reference manual: rzig.html , rzig.pdf
Vignettes: Distributing a package that uses RZig (source, R code)
Exports, internal routines and classes (source, R code)
Numerical routines of R in Zig code (source, R code)
Threads, random numbers and CRAN's two-core rule (source, R code)
Porting a C++ hot loop from Rcpp to RZig (source, R code)
Getting started with RZig (source, R code)
C sources, C libraries and code shared between packages (source, R code)
Updating rzig in a package (source, R code)

Downloads:

Package source: rzig_1.0.0.tar.gz
Windows binaries: r-devel: rzig_0.2.3.zip, r-release: rzig_0.2.3.zip, r-oldrel: rzig_0.2.3.zip
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available
Old sources: rzig archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=rzig to link to this page.