Repository navigation
Update napi-rs: @napi-rs/cli 3.10.8 and latest napi crates in ferric-example - #479
Open
kraenhansen wants to merge 3 commits into
Open
kraenhansen wants to merge 3 commits into
kraenhansen wants to merge 3 commits into
Conversation
Bump @napi-rs/cli from ~3.0.3 to ~3.10.8 and regenerate the ferric-example TypeScript declarations with the new version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GR8DCQmcDBsRJFfDwhy9qx
Bump napi to 3.14.2, napi-derive to 3.6.12 and napi-build to 2.6.0, and remove the direct napi-sys =3.0.1 pin added for #331. napi now depends on napi-sys with default-features = false and only enables its dyn-symbols feature through napi's own default features, which this crate already disables. The addon therefore links the Node-API symbols at link time (resolved by weak-node-api) rather than loading them from the host process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GR8DCQmcDBsRJFfDwhy9qx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GR8DCQmcDBsRJFfDwhy9qx
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@napi-rs/clifrom~3.0.3to~3.10.8(+ patch changeset).ferric_example.d.tsregenerated with the new CLI — the only difference is a blank line after the/* eslint-disable */header.napi=3.4.0→3.14.2,napi-derive3.3.0→3.6.12,napi-build2.2.4→2.6.0, and drop the directnapi-sys = "=3.0.1"pin added for Ferric doesn't supportnapi-sys > 3.0.1/napi > 3.4.0#331.Why the #331 pin can go
#331 was caused by napi-sys'
dyn-symbolsfeature, which resolves Node-API functions from the host process vialibloadinginstead of linking them, soweak-node-apican't provide them. In napi 3.14.x,napidepends onnapi-syswithdefault-features = falseand only turns ondyn-symbolsthrough its own default features, which ferric-example already disables. Verified withcargo tree -e features -i napi-sys(nodyn-symbols), and a host release build's.soimports 28napi_*symbols directly with nodlopen/dlsym.This doesn't fully close #331: crates that keep napi's default features still hit it.
Why this targets
nextrather thanmainThese commits briefly landed on
maindirectly (since reverted by a force-push). There, CI's Test app (iOS) crashed as soon as the ferric-example suite loaded the addon:napi 3.14 calls
napi_add_env_cleanup_hookduring module registration (bindgen_runtime/module_register.rs). Onmain, the host injector only forwards engine functions plus a 12-entryIMPLEMENTED_RUNTIME_FUNCTIONSallowlist, which doesn't include it. Onnext, the injector forwards every Node-API function to Hermes' own implementation, so this should work there. That's the main thing the iOS/Android runs on this PR need to confirm.Notes
@napi-rs/cli3.10.8 depends directly ontypescript@6.0.3. pnpm now also uses it for@react-native-community/cli's optionaltypescriptpeer, which explains the extra peer-suffix churn inpnpm-lock.yaml.pnpm install --lockfile-onlyon top ofnext's lockfile, not merged by hand.ferric build --dts-only, hostcargo build --release. No device testing.🤖 Generated with Claude Code
https://claude.ai/code/session_01GR8DCQmcDBsRJFfDwhy9qx
Generated by Claude Code