% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/treesitter_helpers.R
\name{tcc_generate_bindings}
\alias{tcc_generate_bindings}
\title{Generate bindings from header declarations}
\usage{
tcc_generate_bindings(
  ffi = NULL,
  header,
  mapper = tcc_map_c_type_to_ffi,
  functions = TRUE,
  structs = TRUE,
  unions = TRUE,
  enums = TRUE,
  globals = TRUE,
  bitfield_type = "u8",
  include_bitfields = TRUE
)
}
\arguments{
\item{ffi}{A tcc_ffi object. If NULL, a new one is created.}

\item{header}{Character scalar containing C declarations.}

\item{mapper}{Function to map C types to FFI types.}

\item{functions}{Logical; generate \code{tcc_bind()} specs for functions.}

\item{structs}{Logical; generate \code{tcc_struct()} helpers.}

\item{unions}{Logical; generate \code{tcc_union()} helpers.}

\item{enums}{Logical; generate \code{tcc_enum()} helpers.}

\item{globals}{Logical; generate \code{tcc_global()} getters/setters.}

\item{bitfield_type}{FFI type to use for bitfields.}

\item{include_bitfields}{Whether to include bitfields.}
}
\value{
Updated tcc_ffi object.
}
\description{
Generate bindings from header declarations
}
\examples{
\dontrun{
header <- "double sqrt(double x); struct point { double x; double y; };"
ffi <- tcc_generate_bindings(tcc_ffi(), header)
}
}
