Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: rustup target add
run: rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
- name: Build
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- uses: jdx/mise-action@v3
with:
mise_toml: |
[tools]
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xcframework"
version = "0.1.0"
edition = "2021"
edition = "2024"
license = "MIT"
repository = "https://github.com/human-solutions/xcframework"
description = "A Cargo plugin and library for building Apple XCFrameworks"
Expand All @@ -17,11 +17,11 @@ cargo_metadata = { version = "0.19", features = ["builder"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
yansi = "1.0"
fs-err = "3.0"
fs-err = "3.1"
zip-extensions = { version = "0.8", default-features = false }
xshell = "0.2.6"
glob = "0.3.1"
xshell = "0.2"
glob = "0.3"
xflags = "0.3"

[dev-dependencies]
tempfile = "3.3"
tempfile = "3.20"
11 changes: 6 additions & 5 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]
targets = [
"aarch64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-ios-sim",
"x86_64-apple-darwin",
"x86_64-apple-ios"
"aarch64-apple-darwin",
"aarch64-apple-ios",
"aarch64-apple-ios-sim",
"x86_64-apple-darwin",
"x86_64-apple-ios",
]
2 changes: 1 addition & 1 deletion src/cmd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub mod cargo;
pub mod modulemap;

use anyhow::{anyhow, Result};
use anyhow::{Result, anyhow};
use std::process::Command;
use yansi::Paint;

Expand Down
4 changes: 2 additions & 2 deletions src/cmd/modulemap.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io;

use crate::conf::Configuration;
use anyhow::{bail, Context, Result};
use anyhow::{Context, Result, bail};
use camino_fs::*;
use std::fs::File;

Expand Down Expand Up @@ -46,6 +46,6 @@ fn ls_modulemap_files(dir: &Utf8Path) -> Result<Vec<Utf8PathBuf>> {
Ok(dir
.ls()
.files()
.filter(|path| path.extension().map_or(false, |ext| ext == "modulemap"))
.filter(|path| path.extension() == Some("modulemap"))
.collect())
}
6 changes: 3 additions & 3 deletions src/conf/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::cmd::modulemap;
use anyhow::{anyhow, bail, Context, Result};
use anyhow::{Context, Result, anyhow, bail};
use camino_fs::Utf8PathBuf;
use cargo_metadata::{Metadata, MetadataCommand, Package, TargetKind};

Expand Down Expand Up @@ -71,9 +71,9 @@ impl Configuration {

let metadata = MetadataCommand::new().manifest_path(manifest_path).exec()?;

let workspace_packages = metadata.workspace_packages();
let package = if let Some(package) = &cli.package {
metadata
.workspace_packages()
workspace_packages
.iter()
.find(|p| &p.name == package)
.ok_or(anyhow!("Could not find package '{package}'"))?
Expand Down
8 changes: 2 additions & 6 deletions src/conf/xcframework.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(non_snake_case)]

use super::Target;
use anyhow::{bail, Result};
use anyhow::{Result, bail};
use camino_fs::*;
use serde::Deserialize;
use std::str::FromStr;
Expand Down Expand Up @@ -102,11 +102,7 @@ impl XCFrameworkConfiguration {
) -> Result<Self> {
let mut me = serde_json::from_value::<Self>(section.clone())?;
me.include_dir = package_dir.join(me.include_dir);
if validate {
me.validated()
} else {
Ok(me)
}
if validate { me.validated() } else { Ok(me) }
}

fn validated(self) -> Result<Self> {
Expand Down
2 changes: 1 addition & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;
use anyhow::{Context, Ok};
use camino_fs::*;
use platform::ApplePlatform;
use xshell::{cmd, Shell};
use xshell::{Shell, cmd};

pub mod platform;
pub mod plist;
Expand Down
Loading