Welcome to ClientVPS Mirrors

Help for package rzig

Package {rzig}


Type: Package
Title: Safe Zig Bindings
Version: 0.2.3
Description: 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++.
License: MIT + file LICENSE
URL: https://github.com/MarekDejaUJ/rzig
BugReports: https://github.com/MarekDejaUJ/rzig/issues
Encoding: UTF-8
SystemRequirements: Zig (>= 0.16.0), see https://ziglang.org/download/
NeedsCompilation: no
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
Packaged: 2026-09-03 06:18:10 UTC; runner
Author: Marek Deja ORCID iD [aut, cre]
Maintainer: Marek Deja <marek.deja@uj.edu.pl>
Repository: CRAN
Date/Publication: 2026-09-12 14:40:08 UTC

Safe Zig Bindings

Description

RZig scaffolds packages backed by Zig and generates safe native bindings for plain Zig functions.

Author(s)

Marek Deja


Generate R Bindings from Zig Exports

Description

Scans public Zig functions marked with /// @export, regenerates the Zig manifest and R wrappers, and updates a managed block in ‘NAMESPACE’.

Usage

document(path)

Arguments

path

Path to a package previously initialized with use_rzig().

Value

The normalized package path, invisibly.

Examples


local({
  package_path <- tempfile("rzig-document-", tmpdir = tempdir())
  dir.create(package_path)
  on.exit(unlink(package_path, recursive = TRUE), add = TRUE)
  writeLines(
    c("Package: examplepkg", "Version: 0.0.1"),
    file.path(package_path, "DESCRIPTION")
  )
  use_rzig(package_path)
  document(package_path)
  file.exists(file.path(package_path, "R", "rzig-wrappers.R"))
})


Add RZig to a Package

Description

Creates a Zig source tree, portable build files, a generated native entry stub, and a working hello_zig() example in an existing package.

Usage

use_rzig(path, overwrite = FALSE)

Arguments

path

Path to the package root.

overwrite

Replace files previously managed by RZig.

Value

The normalized package path, invisibly.

Examples


local({
  package_path <- tempfile("rzig-example-", tmpdir = tempdir())
  dir.create(package_path)
  on.exit(unlink(package_path, recursive = TRUE), add = TRUE)
  writeLines(
    c("Package: examplepkg", "Version: 0.0.1"),
    file.path(package_path, "DESCRIPTION")
  )
  use_rzig(package_path)
  file.exists(file.path(package_path, "src", "rzig", "src", "main.zig"))
})

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.