New Architecture-only rewrite of react-native-turbo-image. The published
package's README is packages/react-native-turbo-image/README.md.
1.x is maintained on the 1.x branch.
- Architecture:
docs/architecture.md - Decisions and their reasons:
docs/adr/ - Detailed behaviour:
docs/rfc/0001-turbo-image-2-native-toolchain.md - Dependency matrix:
docs/compatibility-matrix.md - Migrating an app from 1.x:
docs/migration-guide.md
bun install # hoisted node_modules (see bunfig.toml)
bun run check:versions # manifests agree with scripts/native-versions.env
bun run test # JS unit tests (Jest) for src/index.tsx
bun run test:core # C++ core + GoogleTest
bun run test:ios # Nuke adapter tests on an iPhone simulator
bun run test:android # Coil adapter and Android view tests on the connected device or emulator
bun run test:ios:view # iOS view tests, hosted by the example app (after its pod install)
# iOS (CocoaPods)
bun run vendor:nuke # builds TINuke.xcframework and TINukeUI.xcframework (Nuke, renamed) from the pinned tag
(cd apps/example/ios && pod install)
bun run example:ios
# Android
bun run example:android # debug
(cd apps/example && bun run build:android:release) # R8 release buildAfter changing the Codegen spec (src/TurboImageViewNativeComponent.ts),
re-run pod install: iOS Codegen runs there, not during the Xcode build.
Run the app with cd apps/example && npx react-native start, then launch it
from Xcode or Android Studio, or with npx react-native run-ios / run-android.
.github/workflows/v2-publish.yml publishes a pre-release (such as
2.0.0-beta.2) under npm's next dist-tag, and a stable version (such as
2.0.0) under latest, which is what npm install react-native-turbo-image
installs.
-
Set the version in
packages/react-native-turbo-image/package.jsonand get that commit throughv2 CI(push it to the pull request). -
Tag it and push the tag:
git tag v2.0.0-beta.2 && git push origin v2.0.0-beta.2
The workflow checks the tag against package.json and that v2 CI passed on
the commit, builds the Nuke frameworks, and publishes with npm's trusted
publishing, which adds a provenance attestation. It then creates a GitHub
release for the tag, with notes GitHub writes from the pull requests merged
since the previous v2.* tag, so pull request titles are the changelog. A
pre-release gets a GitHub pre-release. A stable version gets a full release,
marked latest, with notes since the previous stable v2.* tag. To rehearse,
run the workflow by hand from the Actions tab: that is a dry run unless told
otherwise.
One-time setup on npmjs.com: react-native-turbo-image → Settings → Trusted
publisher → GitHub Actions, repository duguyihou/react-native-turbo-image,
workflow v2-publish.yml.