Skip to content

fix: restore registerDecls on Zig 0.16#59

Open
GrapeBaBa wants to merge 1 commit into
mainfrom
fix/register-decls-zig-0.16
Open

fix: restore registerDecls on Zig 0.16#59
GrapeBaBa wants to merge 1 commit into
mainfrom
fix/register-decls-zig-0.16

Conversation

@GrapeBaBa

@GrapeBaBa GrapeBaBa commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Motivation

registerDecls is publicly exported, but consumers cannot instantiate it on Zig 0.16. Its implementation declares a type return without returning a type, uses obsolete type-info tags, and still calls the pre-CallbackInfo(argc) function APIs. The string branch also exits module initialization before assigning the export.

Description

  • Return void to match the registration side effect.
  • Update type-info tags and callback construction for Zig 0.16 and the current createFunction API.
  • Preserve the existing behavior of the options parameter.
  • Register string declaration values before continuing through the remaining exports.
  • Add a Node addon fixture and Vitest coverage for function and string declarations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant