Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project setup for iOS #27

Open
lanxinger opened this issue Nov 13, 2024 · 8 comments
Open

Project setup for iOS #27

lanxinger opened this issue Nov 13, 2024 · 8 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lanxinger
Copy link

It would be great to have a basic project setup for compiling on iOS/iPadOS with Xcode.

@fantasy-fish
Copy link

Same request here

@ArthurBrussee ArthurBrussee added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 13, 2024
@ArthurBrussee
Copy link
Owner

Yeah that would be great. I recently got an iPhone so can test now. I am not sure how building for iOs works.

There's some bits in here:
https://github.com/emilk/eframe_template/pull/152/files

Or could use this for both Android & iOs though the Android setup was hard with JNI last time I tried:
https://github.com/tauri-apps/cargo-mobile2

Or maybe this though it seems deprecated
https://github.com/TimNN/cargo-lipo

If someone has more iOs dev experience it'd be really appreciated :)

@fantasy-fish
Copy link

Yeah that would be great. I recently got an iPhone so can test now. I am not sure how building for iOs works.

There's some bits in here: https://github.com/emilk/eframe_template/pull/152/files

Or could use this for both Android & iOs though the Android setup was hard with JNI last time I tried: https://github.com/tauri-apps/cargo-mobile2

Or maybe this though it seems deprecated https://github.com/TimNN/cargo-lipo

If someone has more iOs dev experience it'd be really appreciated :)

I tried to add ios-support based on the efreme_template in this commit. However, there seems some issue with FileDialog: AsyncFilePickerDialogImpl when running the command ./ios-cargo ipa --release

The error looks like below:

chaiwei@MacBook-Pro-4 brush-ios % ./ios-cargo ipa --release       
Creating IPA...
info: component 'rust-std' for target 'aarch64-apple-ios' is up to date
     Removed 0 files
Building dependencies: cargo build --target aarch64-apple-ios --workspace -p brush-viewer -p brush-kernel -p brush-wgsl -p brush-ui -p brush-train -p brush-render --release
warning: unused import: `valid::Capabilities`
 --> crates/brush-wgsl/src/lib.rs:6:29
  |
6 | use naga::{proc::GlobalCtx, valid::Capabilities, Handle, Type};
  |                             ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `brush-wgsl` (lib) generated 1 warning (run `cargo fix --lib -p brush-wgsl` to apply 1 suggestion)
   Compiling rfd v0.12.1
warning: `brush-wgsl` (lib) generated 1 warning (1 duplicate)
error[E0277]: the trait bound `FileDialog: AsyncFilePickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:217:52
    |
217 |         AsyncFilePickerDialogImpl::pick_file_async(self.file_dialog)
    |         ------------------------------------------ ^^^^^^^^^^^^^^^^ the trait `AsyncFilePickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:84:1
    |
84  | pub trait AsyncFilePickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: AsyncFilePickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:222:53
    |
222 |         AsyncFilePickerDialogImpl::pick_files_async(self.file_dialog)
    |         ------------------------------------------- ^^^^^^^^^^^^^^^^ the trait `AsyncFilePickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:84:1
    |
84  | pub trait AsyncFilePickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: AsyncFolderPickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:230:56
    |
230 |         AsyncFolderPickerDialogImpl::pick_folder_async(self.file_dialog)
    |         ---------------------------------------------- ^^^^^^^^^^^^^^^^ the trait `AsyncFolderPickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:90:1
    |
90  | pub trait AsyncFolderPickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: AsyncFolderPickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:238:57
    |
238 |         AsyncFolderPickerDialogImpl::pick_folders_async(self.file_dialog)
    |         ----------------------------------------------- ^^^^^^^^^^^^^^^^ the trait `AsyncFolderPickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:90:1
    |
90  | pub trait AsyncFolderPickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: AsyncFileSaveDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:261:50
    |
261 |         AsyncFileSaveDialogImpl::save_file_async(self.file_dialog)
    |         ---------------------------------------- ^^^^^^^^^^^^^^^^ the trait `AsyncFileSaveDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:96:1
    |
96  | pub trait AsyncFileSaveDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `MessageDialog: AsyncMessageDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/message_dialog.rs:135:44
    |
135 |         AsyncMessageDialogImpl::show_async(self.0)
    |         ---------------------------------- ^^^^^^ the trait `AsyncMessageDialogImpl` is not implemented for `MessageDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:100:1
    |
100 | pub trait AsyncMessageDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: FilePickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:103:41
    |
103 |         FilePickerDialogImpl::pick_file(self)
    |         ------------------------------- ^^^^ the trait `FilePickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:53:1
    |
53  | pub trait FilePickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: FilePickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:108:42
    |
108 |         FilePickerDialogImpl::pick_files(self)
    |         -------------------------------- ^^^^ the trait `FilePickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:53:1
    |
53  | pub trait FilePickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: FolderPickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:113:45
    |
113 |         FolderPickerDialogImpl::pick_folder(self)
    |         ----------------------------------- ^^^^ the trait `FolderPickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:64:1
    |
64  | pub trait FolderPickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: FolderPickerDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:118:46
    |
118 |         FolderPickerDialogImpl::pick_folders(self)
    |         ------------------------------------ ^^^^ the trait `FolderPickerDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:64:1
    |
64  | pub trait FolderPickerDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `FileDialog: FileSaveDialogImpl` is not satisfied
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/file_dialog.rs:137:39
    |
137 |         FileSaveDialogImpl::save_file(self)
    |         ----------------------------- ^^^^ the trait `FileSaveDialogImpl` is not implemented for `FileDialog`
    |         |
    |         required by a bound introduced by this call
    |
help: this trait has no implementations, consider adding one
   --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:59:1
    |
59  | pub trait FileSaveDialogImpl {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `MessageDialog: MessageDialogImpl` is not satisfied
  --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/message_dialog.rs:75:33
   |
75 |         MessageDialogImpl::show(self)
   |         ----------------------- ^^^^ the trait `MessageDialogImpl` is not implemented for `MessageDialog`
   |         |
   |         required by a bound introduced by this call
   |
help: this trait has no implementations, consider adding one
  --> /Users/chaiwei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rfd-0.12.1/src/backend.rs:69:1
   |
69 | pub trait MessageDialogImpl {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0277`.
error: could not compile `rfd` (lib) due to 12 previous errors
Traceback (most recent call last):
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 158, in <module>
    main()
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 155, in main
    ipa(args)
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 103, in ipa
    build(args)
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 60, in build
    subprocess.run(deps_command, env=build_env, check=True)
  File "/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cargo', 'build', '--target', 'aarch64-apple-ios', '--workspace', '-p', 'brush-viewer', '-p', 'brush-kernel', '-p', 'brush-wgsl', '-p', 'brush-ui', '-p', 'brush-train', '-p', 'brush-render', '--release']' returned non-zero exit status 101.

@ArthurBrussee
Copy link
Owner

Hey, thanks for looking into this! And ah yeah RFD doesn't work on iOs :/ Android had this problem too, I implemented a wrapper for android in the rrfd crate. You'll need to add a dummy wrapper for iOs there.

That should get things going at least, can still use a URL to stream in data.

Then at some point need to figure out how to pick files on iOs from rust.... that'll be some more work :)

@fantasy-fish
Copy link

Just added the wrapper for ios in the rrfd crate in this commit. But still have some other compilation errors. Will report here if there's any other progress.

Hey, thanks for looking into this! And ah yeah RFD doesn't work on iOs :/ Android had this problem too, I implemented a wrapper for android in the rrfd crate. You'll need to add a dummy wrapper for iOs there.

That should get things going at least, can still use a URL to stream in data.

Then at some point need to figure out how to pick files on iOs from rust.... that'll be some more work :)

@fantasy-fish
Copy link

I just created this PR. There's no compilation error but it still has linking errors. Below is the full error log. The command I ran is cd crates/brush-ios && ./ios-cargo ipa --release.

error: linking with `xcrun` failed: exit status: 64ixed, naga, re_types_core, image-webp, icu_properties, zune-jpeg, png, ttf-parser, wgpu, icu_normalizer_data, ...
  |
  = note: env -u MACOSX_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Users/chaiwei/google-cloud-sdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/chaiwei/.cargo/bin:/Users/chaiwei/google-cloud-sdk/bin" VSLANG="1033" ZERO_AR_DATE="1" "xcrun" "-Wl,-exported_symbols_list" "-Wl,/tmp/rustceDDJ3x/list" "-arch" "arm64" "/tmp/rustceDDJ3x/symbols.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.zune_jpeg.146fe964f98b9187-cgu.0.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.zune_jpeg.146fe964f98b9187-cgu.1.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.zune_jpeg.146fe964f98b9187-cgu.2.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.zune_jpeg.146fe964f98b9187-cgu.3.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.zune_jpeg.146fe964f98b9187-cgu.4.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/zune_jpeg-43a6b6029cdc0fb9.dwgfikqjgbz1dro8nx1a105he.rcgu.o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/libzune_core-1ce0cfcc21ba7445.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libstd-899c1dc10058bab5.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libpanic_unwind-2d1d8159edc641de.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libobject-ea23f6e983a33c02.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libmemchr-62c1030a1cbf965b.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libaddr2line-b586821fd3f875ab.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libgimli-474caef0e8ea1658.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/librustc_demangle-18acde1ae19f94d8.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libstd_detect-37618758e090f176.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libhashbrown-91b5b24c41f226e8.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/librustc_std_workspace_alloc-146f4e5296100251.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libminiz_oxide-9e1add4840f216c3.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libadler-c56010c71abf1007.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libunwind-f3de18c0d04ba2cb.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libcfg_if-3738dc124f2824a0.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/liblibc-bae753c67f6f431d.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/liballoc-e8c435b244d0be60.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/librustc_std_workspace_core-301b883cf2a82c58.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libcore-70bc56e7f2f09a79.rlib" "/Users/chaiwei/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-ios/lib/libcompiler_builtins-019172bd7b834998.rlib" "-lSystem" "-lc" "-lm" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk" "-o" "/Users/chaiwei/Desktop/rust/brush/target/aarch64-apple-ios/release/deps/libzune_jpeg-43a6b6029cdc0fb9.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" "-target" "arm64-apple-ios" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" "-target" "arm64-apple-ios" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib" "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
  = note: xcrun: error: unrecognized option: -Wl,-exported_symbols_list
          Usage: xcrun [options] <tool name> ... arguments ...
          
          Find and execute the named command line tool from the active developer
          directory.
          
          The active developer directory can be set using `xcode-select`, or via the
          DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual
          pages for more information.
          
          Options:
            -h, --help                  show this help message and exit
            --version                   show the xcrun version
            -v, --verbose               show verbose logging output
            --sdk <sdk name>            find the tool for the given SDK name
            --toolchain <name>          find the tool for the given toolchain
            -l, --log                   show commands to be executed (with --run)
            -f, --find                  only find and print the tool path
            -r, --run                   find and execute the tool (the default behavior)
            -n, --no-cache              do not use the lookup cache
            -k, --kill-cache            invalidate all existing cache entries
            --show-sdk-path             show selected SDK install path
            --show-sdk-version          show selected SDK version
            --show-sdk-build-version    show selected SDK build version
            --show-sdk-platform-path    show selected SDK platform path
            --show-sdk-platform-version show selected SDK platform version
          

error: could not compile `zune-jpeg` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Traceback (most recent call last):     ] 423/679: wgpu                                                                                                              
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 123, in <module>
    main()
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 120, in main
    ipa(args)
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 60, in ipa
    build(args)
  File "/Users/chaiwei/Desktop/rust/brush/crates/brush-ios/./ios-cargo", line 56, in build
    subprocess.run(deps_command, env=env_vars, check=True)
  File "/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cargo', 'build', '--target', 'aarch64-apple-ios', '--workspace', '-p', 'brush-viewer', '-p', 'brush-kernel', '-p', 'brush-wgsl', '-p', 'brush-ui', '-p', 'brush-train', '-p', 'brush-render', '--release']' returned non-zero exit status 101.

@ArthurBrussee
Copy link
Owner

That's awesome! WIll do a full review once you've got it running.

For that error specifically, I noticed you're trying to set xcrun as your linker in the build flags whereas the eframe template doesn't do that. Xcrun is now getting some linker arguments which it can't deal with, so the build fails. In theory linking for iOs just happens with LD so this option doesn't need to be set? I don't know though!

Good luck and again hopefully can try it out & help get it running soon.

@fantasy-fish
Copy link

Get stuck on this PR. It succeeded in building all the crates but unable to pack them into the ipa file. Would be nice if someone take a look and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants