-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixes iOS compiling. #33
Conversation
fcd554d
to
4e15239
Compare
I've updated this PR to use the objective-c feature found in rust-lang/rust-bindgen#1702. We should wait for that to land and be pushed to crates.io to actually merge. |
Hi @simlay, cheers for looking into iOS support. When I try to build this for
Xcode version is 11.3 and
Same error with |
|
Thanks so much for your work on iOS support @simlay! Unfortunately I don't have the means to test macOS and iOS at the moment. If we can get travis building successfully and a tick of approval from another macOS/iOS user I'd be happy to merge! Also, would you be interested in being added as a collaborator at both the |
I’ll fix the build. This PR is dependent on a new release of rust-bindgen to be published on crates.io as more objective-c support has been added. |
Is there any update on this? @simlay 's fixes works and I wonder when can this get merged? |
So, I've added a ton to rust-bindgen in the last 8 months that makes the sys bindings much better but would also be breaking to whatever uses it to generate. If you're familiar with UIKit, I've got a WIP bindings crate for uikit-sys. I'd like to wait until we have rust-lang/rust-bindgen#1847 and rust-lang/rust-bindgen#1784 as those kinda complete the objective-c binding generation from what I can tell. |
@simlay I see. Thanks a lot for your work on those iOS related subjects! |
I've tested this feature branch out again with Xcode 12 (using the latest iOS SDK) on macOS 10.15.6 and for some unclear reason, I get the following stacktrace when compiling for
I don't have this issue when targeting |
f944fa3
to
0dd155b
Compare
@simlay here's the patch of this PR I used when I got audio working on bevy -> rodio -> cpal. I rebased on master, which was
Full diff
|
Thanks so much for all your work on this folks! @simlay & @MichaelHills, just let me know if you'd like to become a co-maintainer of the repo and crate - I don't want my lack of time or the fact I don't have a Mac anymore to hold any progress back here. |
@mitchmindtree probably a good idea for one or both of us to be a co-maintainer especially since you don't have a Mac. @simlay is very active in the Rust iOS community and has been for a long time it seems. :) I have been focused on just getting the bevy game engine fully working on iOS and audio is the last piece of the puzzle. Given the amount of effort I've spent getting audio working on iOS, it makes sense for me to help continue to refine it. Would love to have someone else help me test though! In case you didn't see it, I have this up on |
Thanks @MichaelHills, I've invited you and @simlay to a Also, manually publishing coreaudio-sys should rarely be necessary as we have github actions that should auto-publish when a commit lands in master that updates the version - it might be worth moving coreaudio-rs from travis onto a similar github workflow? |
Thanks @mitchmindtree, auto publish for coreaudio-rs sounds good though not necessary. I'm a bit time poor after the big push I did on bevy iOS so will focus my efforts on coreaudio-rs and cpal actual code changes for the time being. Might chase up some testers to help me test. :) |
@simlay we should publish a new version so that RustAudio/coreaudio-rs#72 can be landed and subsequently RustAudio/cpal#485. I'm not familiar with the release process of rust crates and versioning. What should the new version number be? |
Might be nice to also clean up all the warnings. One thing at a time I guess. |
You mean the
Well, for everyone else in the non-iOS rust ecosystem this is a pretty small change and it's non breaking to anything. I'd say going from |
Oh maybe I meant in coreaudio-rs, there's a bunch of try! and dyn trait warnings. Looks like there's nothing we can do about the u128 ones at the moment? |
It's unclear if this finishes #29 but this deals with a pretty annoying edge case when building for
aarch64-apple-ios
as described here: rust-lang/rust-bindgen#1211.Also, you might notice that
rustup target list | grep ios
yields something like:The
i386
andx86_64
targets don't have architecture support in theiPhoneOS13.2.sdk
it seems. I can share the stack trace if you'd like. For now compiling for aarch64, armv7 and armv7s I think is more than enough.