RustQ.Rustler.Nif (rustq v0.8.3)

Copy Markdown View Source

Generates Rustler NIF exports, NifStruct declarations, and raw NIF_TERM builders.

Most helpers in this module use RustQ AST. The raw NIF_TERM builders are an explicit low-level Rustler escape boundary for unsafe wrapper APIs; prefer RustQ.Rustler.Term helpers when normal Term<'a> values are available.

Summary

Types

spec()

@type spec() :: {atom() | String.t(), keyword()}

Functions

export(name, opts)

@spec export(
  atom() | String.t(),
  keyword()
) :: RustQ.Rust.Function.t()

exports(specs)

@spec exports([spec()]) :: [RustQ.Rust.Function.t()]

struct(name, module, opts \\ [])

@spec struct(atom() | String.t(), module() | String.t(), keyword()) ::
  RustQ.Rust.Fragment.t()

term_builders(opts \\ [])

@spec term_builders(keyword()) :: [RustQ.Rust.Fragment.t()]