File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import {
2626 ensureInstalledTargets ,
2727 filterTargetsByPlatform ,
2828} from "./targets.js" ;
29- import { error } from "node:console" ;
3029
3130const ANDROID_TRIPLET_PER_TARGET : Record < AndroidTargetName , AndroidTriplet > = {
3231 "aarch64-linux-android" : "aarch64-linux-android" ,
@@ -90,7 +89,7 @@ export const buildCommand = new Command("build")
9089 }
9190 ensureCargo ( ) ;
9291 ensureInstalledTargets ( targets ) ;
93- // TODO: Ensure the iOS and Android targets are installed
92+
9493 const appleTargets = filterTargetsByPlatform ( targets , "apple" ) ;
9594 const androidTargets = filterTargetsByPlatform ( targets , "android" ) ;
9695
@@ -192,8 +191,6 @@ export const buildCommand = new Command("build")
192191 }
193192 ) ;
194193 }
195-
196- // TODO: Handle Apple and constructing an XCFramework
197194 } catch ( error ) {
198195 if ( error instanceof SpawnFailure ) {
199196 error . flushOutput ( "both" ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ export type AppleTargetName = (typeof APPLE_TARGETS)[number];
5151export const ALL_TARGETS = [ ...ANDROID_TARGETS , ...APPLE_TARGETS ] as const ;
5252export type TargetName = ( typeof ALL_TARGETS ) [ number ] ;
5353
54+ /**
55+ * Ensure the targets are installed into the Rust toolchain
56+ * We do this up-front because the error message and fix is very unclear from the failure when missing.
57+ */
5458export function ensureInstalledTargets ( expectedTargets : Set < TargetName > ) {
5559 const installedTargets = getInstalledTargets ( ) ;
5660 const missingTargets = new Set ( [
You can’t perform that action at this time.
0 commit comments