Derive target and triplet lists instead of hardcoding them (`cmake-rn`, `ferric`)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- android, cmake, ios, rust, typescript
- Lĩnh vực
- build-system, mobile-dev, tooling
Hướng nghiên cứu
Bắt đầu bằng việc đọc các TODOs và các entry point được tham chiếu: packages/cmake-rn/src/platforms/apple.ts, android.ts, cli.ts và packages/ferric/src/targets.ts. So sánh các heuristic hiện tại và các danh sách hardcoded của chúng với các probe hoặc dữ liệu package được đề xuất, sau đó xác minh rằng targets và triplets tuân theo toolchain đang hoạt động và cấu hình của dự án, đồng thời giữ nguyên behavior fallback đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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/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
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
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 188
- Fork
- 10
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/react-native-node-api
-
Android 🤖
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects Đang mởAndroid 🤖 good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/react-native-node-api#163 · 1 bình luận ·
-
enhancement good first issue gyp-to-cmake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/react-native-node-api#161 · 3 bình luận · 1 reaction ·
-
enhancement Host 🏡
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Automatable good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
callstackincubator/react-native-node-api#424 · 1 bình luận ·
Tất cả issue của callstackincubator/react-native-node-api
Issue tương tự
-
blocklist removal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pastelsky/bundlephobia#1122 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100