Skip to content

Commit 6a0a576

Browse files
committed
Cleanup
1 parent 70c0f8f commit 6a0a576

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/ferric/src/build.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
ensureInstalledTargets,
2727
filterTargetsByPlatform,
2828
} from "./targets.js";
29-
import { error } from "node:console";
3029

3130
const 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");

packages/ferric/src/targets.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export type AppleTargetName = (typeof APPLE_TARGETS)[number];
5151
export const ALL_TARGETS = [...ANDROID_TARGETS, ...APPLE_TARGETS] as const;
5252
export 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+
*/
5458
export function ensureInstalledTargets(expectedTargets: Set<TargetName>) {
5559
const installedTargets = getInstalledTargets();
5660
const missingTargets = new Set([

0 commit comments

Comments
 (0)