Skip to content

chore(node-ffi): upgrade napi and streamline build pipeline#877

Open
lukasIO wants to merge 45 commits intomainfrom
lukas/binding-build
Open

chore(node-ffi): upgrade napi and streamline build pipeline#877
lukasIO wants to merge 45 commits intomainfrom
lukas/binding-build

Conversation

@lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Feb 9, 2026

when trying to address some rough edges in the build pipeline, I ended up with a new publishing flow that should be a lot more straight forward to work with.

  • it updates napi and related tools to the latest major version (trickier than expected fwiw)
  • it uses napi's default directory structure (no special flags need to be passed and no manual copying around of files)
  • it ditches the typescript compilation step as all the artifacts that are emitted by napi (and proto-gen-es) are .js+.d.ts anyways
  • hardens the node build pipeline and ensures we have up to date binary builds each time (this comes with the caveat that there will be two commits created as part of the pipeline, but that's the tradeoff I had to make: first update the package.json version -> then build on each platform -> then use the JS artifacts of one platform and commit them so that the code is up to date) - fwiw I wish there was an option to tell napi to build the JS artifacts only, but there isn't

note the diff size results from replacing the .ts files of the proto generator with the .js+.d.ts equivalents

Copy link
Contributor

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm assuming the CIs / tests pass

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.

2 participants