diff --git a/.gitignore b/.gitignore index 5fbe6593..049133dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /target -test.yaml \ No newline at end of file +test.yaml + +binaries/geph5-ios/geph5/geph5.xcodeproj/xcuserdata +binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/xcuserdata \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 21fa4f6e..1dc80bff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2296,8 +2296,7 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "ecolor" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6b451ff1143f6de0f33fc7f1b68fecfd2c7de06e104de96c4514de3f5396f8" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "bytemuck", "emath", @@ -2332,15 +2331,14 @@ dependencies = [ [[package]] name = "eframe" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6490ef800b2e41ee129b1f32f9ac15f713233fe3bc18e241a1afe1e4fb6811e0" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "ahash", "bytemuck", "document-features", "egui", "egui-wgpu", - "egui-winit", + "egui-winit 0.28.1 (git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes)", "egui_glow", "glow", "glutin", @@ -2353,6 +2351,7 @@ dependencies = [ "objc2-foundation", "parking_lot", "percent-encoding", + "pollster 0.3.0", "raw-window-handle 0.5.2", "raw-window-handle 0.6.2", "static_assertions", @@ -2360,6 +2359,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", + "wgpu", "winapi", "winit", ] @@ -2367,8 +2367,7 @@ dependencies = [ [[package]] name = "egui" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c97e70a2768de630f161bb5392cbd3874fcf72868f14df0e002e82e06cb798" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "accesskit", "ahash", @@ -2382,8 +2381,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c7a7c707877c3362a321ebb4f32be811c0b91f7aebf345fb162405c0218b4c" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "ahash", "bytemuck", @@ -2403,6 +2401,19 @@ name = "egui-winit" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fac4e066af341bf92559f60dbdf2020b2a03c963415349af5f3f8d79ff7a4926" +dependencies = [ + "ahash", + "egui", + "log", + "raw-window-handle 0.6.2", + "web-time", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.28.1" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "accesskit_winit", "ahash", @@ -2419,8 +2430,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb783d9fa348f69ed5c340aa25af78b5472043090e8b809040e30960cc2a746" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "ahash", "egui", @@ -2436,8 +2446,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2bdc8b38cfa17cc712c4ae079e30c71c00cd4c2763c9e16dc7860a02769103" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "ahash", "bytemuck", @@ -2501,8 +2510,7 @@ dependencies = [ [[package]] name = "emath" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6a21708405ea88f63d8309650b4d77431f4bc28fb9d8e6f77d3963b51249e6" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "bytemuck", "serde", @@ -2586,8 +2594,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0dcc0a0771e7500e94cd1cb797bd13c9f23b9409bdc3c824e2cbc562b7fa01" +source = "git+https://github.com/lucasmerlin/egui?branch=eframe_ios_fixes#d30a8fba0d84366f3aa53181a10c4906e9351c6b" dependencies = [ "ab_glyph", "ahash", @@ -3075,6 +3082,7 @@ dependencies = [ "atomic_float", "aws-config", "aws-sdk-lambda", + "aws-smithy-runtime", "blake3", "blind-rsa-signatures", "bytes", @@ -3094,6 +3102,7 @@ dependencies = [ "http 1.1.0", "http-body-util", "hyper 1.4.1", + "hyper-rustls 0.24.2", "hyper-util", "ipstack-geph", "isahc", @@ -3147,7 +3156,7 @@ dependencies = [ "anyhow", "egui", "egui-wgpu", - "egui-winit", + "egui-winit 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger", "geph5-client-gui", "jni", @@ -3254,6 +3263,14 @@ dependencies = [ "x25519-dalek", ] +[[package]] +name = "geph5-ios" +version = "0.1.0" +dependencies = [ + "eframe", + "geph5-client-gui", +] + [[package]] name = "geph5-misc-rpc" version = "0.1.0" @@ -3772,6 +3789,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls 0.24.1", + "webpki-roots 0.25.4", ] [[package]] @@ -7996,6 +8014,7 @@ dependencies = [ "document-features", "js-sys", "log", + "naga", "parking_lot", "profiling", "raw-window-handle 0.6.2", @@ -8046,6 +8065,7 @@ dependencies = [ "arrayvec", "ash", "bitflags 2.6.0", + "block", "cfg_aliases", "core-graphics-types", "glow", @@ -8432,8 +8452,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" version = "0.29.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +source = "git+https://github.com/lucasmerlin/winit?branch=geph-v0.29.x#68df516b3c7dda35b48b7eb9e8c478e7ca4e25e6" dependencies = [ "ahash", "android-activity", diff --git a/Cargo.toml b/Cargo.toml index 70996260..5fc6123c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,17 @@ opt-level = 3 [profile.release-dbg] inherits = "dev" opt-level = 3 + +[patch.crates-io] +# We currently need two egui PRs to fix iOS builds: +# https://github.com/emilk/egui/pull/4855 +# https://github.com/emilk/egui/pull/4851 +# I've combined the changes in a branch in my fork: +egui = { git = "https://github.com/lucasmerlin/egui", branch = "eframe_ios_fixes" } +eframe = { git = "https://github.com/lucasmerlin/egui", branch = "eframe_ios_fixes" } +egui-wgpu = { git = "https://github.com/lucasmerlin/egui", branch = "eframe_ios_fixes" } +egui_extras = { git = "https://github.com/lucasmerlin/egui", branch = "eframe_ios_fixes" } +emath = { git = "https://github.com/lucasmerlin/egui", branch = "eframe_ios_fixes" } + + +winit = { git = "https://github.com/lucasmerlin/winit", branch = "geph-v0.29.x" } \ No newline at end of file diff --git a/binaries/geph5-client-gui/Cargo.toml b/binaries/geph5-client-gui/Cargo.toml index aab3939c..9f63dded 100644 --- a/binaries/geph5-client-gui/Cargo.toml +++ b/binaries/geph5-client-gui/Cargo.toml @@ -14,7 +14,7 @@ icon = ["icon.png"] anyhow = "1.0.86" csv = "1.3.0" # dirs = "5.0.1" -eframe = { version = "0.28.1" } +eframe = { version = "0.28.1", default-features = false } egui = "0.28.1" moka = { version = "0.12.7", features = ["sync"] } arc-writer = { path = "../../libraries/arc-writer" } @@ -56,10 +56,13 @@ strip-ansi-escapes = "0.2.0" [build-dependencies] winresource = "0.1" -[target.'cfg(not(target_os = "android"))'.dependencies] +[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] single-instance = "0.3.3" native-dialog = "0.7.0" +[target.'cfg(not(target_os = "ios"))'.dependencies] +eframe = { version = "0.28.1", default-features = true } + [target.'cfg(windows)'.dependencies] winreg = "0.52.0" winapi = { version = "0.3.9", features = ["wininet"] } diff --git a/binaries/geph5-client-gui/src/lib.rs b/binaries/geph5-client-gui/src/lib.rs index 5e3d5852..bba020f7 100644 --- a/binaries/geph5-client-gui/src/lib.rs +++ b/binaries/geph5-client-gui/src/lib.rs @@ -142,7 +142,7 @@ impl App { } }); - #[cfg(not(target_os = "android"))] + #[cfg(not(any(target_os = "android", target_os = "ios")))] if let Err(err) = result.inner { use native_dialog::MessageType; let _ = native_dialog::MessageDialog::new() diff --git a/binaries/geph5-client-gui/src/pac/mod.rs b/binaries/geph5-client-gui/src/pac/mod.rs index 0852f2b8..425ff3ca 100644 --- a/binaries/geph5-client-gui/src/pac/mod.rs +++ b/binaries/geph5-client-gui/src/pac/mod.rs @@ -16,3 +16,6 @@ pub use macos::*; mod dummy; #[cfg(target_os = "android")] pub use dummy::*; + +#[cfg(target_os = "ios")] +pub use dummy::*; diff --git a/binaries/geph5-client-gui/src/tabs/logs.rs b/binaries/geph5-client-gui/src/tabs/logs.rs index b990fa08..92fccc46 100644 --- a/binaries/geph5-client-gui/src/tabs/logs.rs +++ b/binaries/geph5-client-gui/src/tabs/logs.rs @@ -42,7 +42,7 @@ impl Logs { if let Some(Ok(logs)) = logs { let logs = strip_ansi_escapes::strip_str(logs.join("\n")); - #[cfg(not(target_os = "android"))] + #[cfg(not(any(target_os = "android", target_os = "ios")))] if ui.button(l10n("export_logs")).clicked() { use native_dialog::FileDialog; let path = FileDialog::new() diff --git a/binaries/geph5-client/Cargo.toml b/binaries/geph5-client/Cargo.toml index b6d8ad78..82dde9af 100644 --- a/binaries/geph5-client/Cargo.toml +++ b/binaries/geph5-client/Cargo.toml @@ -15,7 +15,8 @@ async-dup = "1.2.4" async-trait = "0.1.80" atomic_float = "1.0.0" aws-config = "1.5.4" -aws-sdk-lambda = "1.35.0" +aws-sdk-lambda = { version = "1.35.0", features = ["rustls"] } +aws-smithy-runtime = "1" blake3 = "1.5.1" blind-rsa-signatures = "0.15.1" bytes = "1.6.0" @@ -34,6 +35,7 @@ hex = "0.4.3" http = "1.1.0" http-body-util = "0.1.2" hyper = { version = "1.4.0", features = ["http1", "client", "server"] } +hyper-rustls = { version = "0.24.2", features = ["webpki-roots"] } hyper-util = { version = "0.1.6" } ipstack-geph = "0.2.0" # ipstack-geph={path="../../../ipstack-geph"} diff --git a/binaries/geph5-client/src/broker/aws_lambda.rs b/binaries/geph5-client/src/broker/aws_lambda.rs index 6ce0df37..3a5972bd 100644 --- a/binaries/geph5-client/src/broker/aws_lambda.rs +++ b/binaries/geph5-client/src/broker/aws_lambda.rs @@ -4,6 +4,7 @@ use aws_config::BehaviorVersion; use aws_sdk_lambda::{config::Credentials, primitives::Blob}; use nanorpc::{JrpcRequest, JrpcResponse, RpcTransport}; use serde::Deserialize; +use aws_smithy_runtime::client::http::hyper_014::HyperClientBuilder; pub struct AwsLambdaTransport { pub function_name: String, @@ -16,6 +17,19 @@ pub struct AwsLambdaTransport { impl RpcTransport for AwsLambdaTransport { type Error = anyhow::Error; async fn call_raw(&self, req: JrpcRequest) -> Result { + // To use webpki-roots we need to create a custom http client, as explained here: https://github.com/smithy-lang/smithy-rs/discussions/3022 + + // Create a connector that will be used to establish TLS connections + let tls_connector = hyper_rustls::HttpsConnectorBuilder::new() + .with_webpki_roots() + .https_only() + .enable_http1() + .enable_http2() + .build(); + + // Create a hyper-based HTTP client that uses this TLS connector. + let http_client = HyperClientBuilder::new().build(tls_connector); + let client = aws_sdk_lambda::Client::new( &aws_config::defaults(BehaviorVersion::v2024_03_28()) .region(string_to_static_str(self.region.clone())) @@ -26,6 +40,7 @@ impl RpcTransport for AwsLambdaTransport { None, "test", )) + .http_client(http_client) .load() .await, ); diff --git a/binaries/geph5-client/src/vpn.rs b/binaries/geph5-client/src/vpn.rs index 1063d745..7f89fd89 100644 --- a/binaries/geph5-client/src/vpn.rs +++ b/binaries/geph5-client/src/vpn.rs @@ -4,10 +4,10 @@ mod linux; #[cfg(target_os = "linux")] pub use linux::*; -#[cfg(target_os = "android")] +#[cfg(any(target_os = "android", target_os = "ios"))] mod dummy; -#[cfg(target_os = "android")] +#[cfg(any(target_os = "android", target_os = "ios"))] pub use dummy::*; use std::{net::Ipv4Addr, time::Duration}; diff --git a/binaries/geph5-ios/Cargo.toml b/binaries/geph5-ios/Cargo.toml new file mode 100644 index 00000000..8077f4d6 --- /dev/null +++ b/binaries/geph5-ios/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "geph5-ios" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["staticlib"] + +[dependencies] + +# I couldn't get it to work with glow, but I think wgpu shoulg be better on iOS anyway, since it uses metal (opengl is deprecated on iOS) +eframe = { version = "0.28.1", features = ["wgpu", "default_fonts"], default-features = false } + +geph5-client-gui = { path = "../geph5-client-gui" } \ No newline at end of file diff --git a/binaries/geph5-ios/build.sh b/binaries/geph5-ios/build.sh new file mode 100755 index 00000000..25517a08 --- /dev/null +++ b/binaries/geph5-ios/build.sh @@ -0,0 +1,7 @@ +#!/bin/zsh + +if [ $CONFIGURATION = "Release" ]; then + cargo build --target aarch64-apple-ios --release +else + cargo build --target aarch64-apple-ios +fi diff --git a/binaries/geph5-ios/geph5/geph5.xcodeproj/project.pbxproj b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0de77ccd --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.pbxproj @@ -0,0 +1,403 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + E36F10E52C511ED7004FD70A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E36F10E42C511ED7004FD70A /* Assets.xcassets */; }; + E36F10E82C511ED7004FD70A /* Base in Resources */ = {isa = PBXBuildFile; fileRef = E36F10E72C511ED7004FD70A /* Base */; }; + E36F10EB2C511ED7004FD70A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E36F10EA2C511ED7004FD70A /* main.m */; }; + E36F10F42C51278F004FD70A /* libgeph5_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F10F32C512763004FD70A /* libgeph5_ios.a */; }; + E36F10F62C512A35004FD70A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F10F52C512A35004FD70A /* UIKit.framework */; }; + E36F10F82C512A53004FD70A /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F10F72C512A53004FD70A /* Metal.framework */; }; + E36F10F92C512C64004FD70A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E36F10E62C511ED7004FD70A /* LaunchScreen.storyboard */; }; + E36F10FC2C512D43004FD70A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E36F10FA2C512D43004FD70A /* Main.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E36F10D52C511ED6004FD70A /* geph5.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = geph5.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E36F10E42C511ED7004FD70A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E36F10E72C511ED7004FD70A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E36F10E92C511ED7004FD70A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E36F10EA2C511ED7004FD70A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + E36F10F12C511F3E004FD70A /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = ""; }; + E36F10F32C512763004FD70A /* libgeph5_ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgeph5_ios.a; path = "../../../target/aarch64-apple-ios/debug/libgeph5_ios.a"; sourceTree = ""; }; + E36F10F52C512A35004FD70A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + E36F10F72C512A53004FD70A /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; + E36F10FB2C512D43004FD70A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E36F10D22C511ED6004FD70A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E36F10F42C51278F004FD70A /* libgeph5_ios.a in Frameworks */, + E36F10F82C512A53004FD70A /* Metal.framework in Frameworks */, + E36F10F62C512A35004FD70A /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E36F10CC2C511ED6004FD70A = { + isa = PBXGroup; + children = ( + E36F10D72C511ED6004FD70A /* geph5 */, + E36F10D62C511ED6004FD70A /* Products */, + E36F10F22C512763004FD70A /* Frameworks */, + ); + sourceTree = ""; + }; + E36F10D62C511ED6004FD70A /* Products */ = { + isa = PBXGroup; + children = ( + E36F10D52C511ED6004FD70A /* geph5.app */, + ); + name = Products; + sourceTree = ""; + }; + E36F10D72C511ED6004FD70A /* geph5 */ = { + isa = PBXGroup; + children = ( + E36F10FA2C512D43004FD70A /* Main.storyboard */, + E36F10E42C511ED7004FD70A /* Assets.xcassets */, + E36F10E62C511ED7004FD70A /* LaunchScreen.storyboard */, + E36F10E92C511ED7004FD70A /* Info.plist */, + E36F10EA2C511ED7004FD70A /* main.m */, + E36F10F12C511F3E004FD70A /* bindings.h */, + ); + path = geph5; + sourceTree = ""; + }; + E36F10F22C512763004FD70A /* Frameworks */ = { + isa = PBXGroup; + children = ( + E36F10F72C512A53004FD70A /* Metal.framework */, + E36F10F52C512A35004FD70A /* UIKit.framework */, + E36F10F32C512763004FD70A /* libgeph5_ios.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E36F10D42C511ED6004FD70A /* geph5 */ = { + isa = PBXNativeTarget; + buildConfigurationList = E36F10EE2C511ED7004FD70A /* Build configuration list for PBXNativeTarget "geph5" */; + buildPhases = ( + E36F11012C51370F004FD70A /* ShellScript */, + E36F10D12C511ED6004FD70A /* Sources */, + E36F10D22C511ED6004FD70A /* Frameworks */, + E36F10D32C511ED6004FD70A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = geph5; + productName = geph5; + productReference = E36F10D52C511ED6004FD70A /* geph5.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E36F10CD2C511ED6004FD70A /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1540; + TargetAttributes = { + E36F10D42C511ED6004FD70A = { + CreatedOnToolsVersion = 15.4; + }; + }; + }; + buildConfigurationList = E36F10D02C511ED6004FD70A /* Build configuration list for PBXProject "geph5" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E36F10CC2C511ED6004FD70A; + productRefGroup = E36F10D62C511ED6004FD70A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E36F10D42C511ED6004FD70A /* geph5 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E36F10D32C511ED6004FD70A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E36F10E52C511ED7004FD70A /* Assets.xcassets in Resources */, + E36F10F92C512C64004FD70A /* LaunchScreen.storyboard in Resources */, + E36F10E82C511ED7004FD70A /* Base in Resources */, + E36F10FC2C512D43004FD70A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + E36F11012C51370F004FD70A /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/zsh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ../ && ./build.sh\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E36F10D12C511ED6004FD70A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E36F10EB2C511ED7004FD70A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + E36F10E62C511ED7004FD70A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E36F10E72C511ED7004FD70A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + E36F10FA2C512D43004FD70A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E36F10FB2C512D43004FD70A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E36F10EC2C511ED7004FD70A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + E36F10ED2C511ED7004FD70A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E36F10EF2C511ED7004FD70A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9GV4V293LJ; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = geph5/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../../target/aarch64-apple-ios/$(CONFIGURATION)"; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.geph.geph5; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E36F10F02C511ED7004FD70A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9GV4V293LJ; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = geph5/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../../target/aarch64-apple-ios/$(CONFIGURATION)"; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.geph.geph5; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E36F10D02C511ED6004FD70A /* Build configuration list for PBXProject "geph5" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E36F10EC2C511ED7004FD70A /* Debug */, + E36F10ED2C511ED7004FD70A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E36F10EE2C511ED7004FD70A /* Build configuration list for PBXNativeTarget "geph5" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E36F10EF2C511ED7004FD70A /* Debug */, + E36F10F02C511ED7004FD70A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E36F10CD2C511ED6004FD70A /* Project object */; +} diff --git a/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AccentColor.colorset/Contents.json b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AppIcon.appiconset/Contents.json b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..13613e3e --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/binaries/geph5-ios/geph5/geph5/Assets.xcassets/Contents.json b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/binaries/geph5-ios/geph5/geph5/Base.lproj/LaunchScreen.storyboard b/binaries/geph5-ios/geph5/geph5/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/binaries/geph5-ios/geph5/geph5/Base.lproj/Main.storyboard b/binaries/geph5-ios/geph5/geph5/Base.lproj/Main.storyboard new file mode 100644 index 00000000..0ade5445 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/binaries/geph5-ios/geph5/geph5/Info.plist b/binaries/geph5-ios/geph5/geph5/Info.plist new file mode 100644 index 00000000..0c67376e --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/Info.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/binaries/geph5-ios/geph5/geph5/bindings.h b/binaries/geph5-ios/geph5/geph5/bindings.h new file mode 100644 index 00000000..958c4611 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/bindings.h @@ -0,0 +1,2 @@ + +void start_app(void); diff --git a/binaries/geph5-ios/geph5/geph5/main.m b/binaries/geph5-ios/geph5/geph5/main.m new file mode 100644 index 00000000..ebea8061 --- /dev/null +++ b/binaries/geph5-ios/geph5/geph5/main.m @@ -0,0 +1,8 @@ +#include "bindings.h" + +int main(int argc, char * argv[]) { + + start_app(); + + return 0; +} diff --git a/binaries/geph5-ios/src/lib.rs b/binaries/geph5-ios/src/lib.rs new file mode 100644 index 00000000..538a18eb --- /dev/null +++ b/binaries/geph5-ios/src/lib.rs @@ -0,0 +1,20 @@ +use eframe::egui::Window; + +#[no_mangle] +pub extern "C" fn start_app() { + start() +} + +fn start() { + let mut text = String::new(); + + let mut app = None; + + eframe::run_simple_native("geph5", Default::default(), move |ctx, frame| { + let app = app.get_or_insert_with(|| { + geph5_client_gui::App::new(ctx) + }); + + app.render(ctx); + }).unwrap(); +} \ No newline at end of file