Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Derive target and triplet lists instead of hardcoding them (`cmake-rn`, `ferric`)

Aperta
#417 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
android, cmake, ios, rust, typescript

Direzione di ricerca

Inizia leggendo i TODOs e gli entry point referenziati: packages/cmake-rn/src/platforms/apple.ts, android.ts, cli.ts e packages/ferric/src/targets.ts. Confronta le loro euristiche attuali e gli elenchi hardcoded con le probe o i dati dei pacchetti proposti, quindi verifica che target e triplet seguano la toolchain attiva e la configurazione del progetto, mantenendo il comportamento di fallback indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

CMake RN enhancement Ferric 🦀

Grouping four TODOs that all come down to the same thing: the set of targets we build for is hardcoded or guessed, rather than derived from the toolchain and the project being built.

cmake-rn: default triplets are a heuristic

In current-development mode both platforms guess which device the developer is targeting instead of asking:

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/cmake-rn/src/platforms/apple.ts#L251-L254

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/cmake-rn/src/platforms/android.ts#L106-L109

Apple always returns arm64;x86_64-apple-ios-sim, so a developer iterating against a physical device or a tvOS/visionOS simulator silently builds the wrong slice. Android infers the ABI from process.arch, i.e. from the host architecture, which is wrong whenever the running emulator's ABI differs from the machine's. Both could be replaced with a probe — xcrun simctl list devices booted --json and adb devices + adb shell getprop ro.product.cpu.abi respectively — falling back to today's heuristic when nothing is booted.

cmake-rn: no default triplets at all outside the env var

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/cmake-rn/src/cli.ts#L42-L43

As the TODO notes, this matters most when the build is driven from within a React Native app package, where the app's own configuration already says which platforms and architectures are in play.

ferric: hardcoded Apple target list

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/ferric/src/targets.ts#L18-L19

The list has to be kept in sync with Rust's supported targets by hand, and the commented-out Catalyst entries show it already drifting. Either query rustup target list or take the list from @napi-rs/triples.

These can land separately; they are filed together because a fix for one informs the shape of the others.

Lingua principale
TypeScript
Stelle
188
Fork
10
Merge medio
2g 17h
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/react-native-node-api

Tutte le issue di callstackincubator/react-native-node-api

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.