Rust library works on Intel macs, but not M1s

Hey folks, not sure if this is the best place to ask but I've looked all over and the Rust forums haven't been able to help much.

I have a cross-platform text-to-speech Rust library for use in game engines and such. Among the platforms I support are macOS and iOS via AppKit or AVFoundation, as appropriate.

My AppKit backend works fine on M1/Intel macs. Unfortunately, my AVFoundation backend doesn't. I unfortunately don't have an M1 to test on, but apparently it tries and fails to speak the first utterance and the cancellation callback runs. Subsequent utterances don't speak. I assume this will fail on iOS as well.

Apologies I can't get this to a more minimal example, but I'm not sure where the problem is. The code in question begins here. To duplicate the behavior in question, you'll need a Rust toolchain on an M1. Then, something like cargo run --example hello_world should do it, or RUST_LOG=trace cargo run --example hello_world for more detailed logging from the library itself.

Tips on debugging Rust/Objective C interop are also welcome. I think I enabled the Rust feature to trap and surface exceptions, but that hasn't gotten me anything and I'm kind of at a loss.

Thanks a bunch for any help.

not sure if this is the best place to ask

I’m sure there is a good place for questions like this, although the Debugging tag is always a good option for weird stuff that has no other obvious place.

With regards your main problem, is your Rust code built Arm or Intel?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Rust library works on Intel macs, but not M1s
 
 
Q