Skip to content

chore: Upgrade to Nitro 0.35.0#4849

Open
mrousavy wants to merge 5 commits intoTheWidlarzGroup:masterfrom
mrousavy:fix/upgrade-nitro-35
Open

chore: Upgrade to Nitro 0.35.0#4849
mrousavy wants to merge 5 commits intoTheWidlarzGroup:masterfrom
mrousavy:fix/upgrade-nitro-35

Conversation

@mrousavy
Copy link
Contributor

@mrousavy mrousavy commented Mar 4, 2026

Upgrades to Nitro 0.35.0, which contains a BREAKING CHANGE related to Kotlin HybridObjects (it fixes a critical memory leak, so it is advised everyone upgrades)

Steps I did (you can follow):

  1. Upgrade react-native-nitro-modules and nitrogen to 0.35.0
  2. Run bun install & pod install
  3. Replace all usages of bigint with Int64/UInt64 (in this repo; duration and fileSize *1)
  4. Re-generate specs using bun nitrogen
  5. (Optionally) replaced the cpp-adapter.cpp call from initialize(vm) with registerAllNatives() - this just allows you to register custom JNI natives in your libs, if needed.

Also, I removed the nitrogen and react-native-nitro-modules patches since I don't think they are necessary anymore. The boolean/number thing in Swift has been fixed upstream, and the exception handling is fixed in react-native core :)

  • *1: Shouldn't duration be a number (double)? Right now, it can't have commas. It's documented as "The duration of the video in seconds.", and seconds definitely has commas.

@mrousavy mrousavy marked this pull request as ready for review March 4, 2026 13:49
Copy link
Contributor

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

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

Also, I removed the nitrogen and react-native-nitro-modules patches since I don't think they are necessary anymore. The boolean/number thing in Swift has been fixed upstream, and the exception handling is fixed in react-native core :)

I agree. latest React Native is already 0.84, so it shoud be safe to remove that.

*1: Shouldn't duration be a number (double)? Right now, it can't have commas. It's documented as "The duration of the video in seconds.", and seconds definitely has commas.

Yes, nice find — we need to change it to ms or leave as it is and change type to a number.

cc @moskalakamil

@mrousavy
Copy link
Contributor Author

mrousavy commented Mar 4, 2026

I think seconds is good, and double. I do the same in VisionCamera

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

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

2 participants