Open 1tgr opened 3 months ago
I think this is telling me that Swift arrays and objc2's arrays don't agree on signed vs unsigned?
Rather, Swift is lazy and uses Int
instead of the more correct type UInt
here; the difference doesn't really matter to them, as arrays likely won't be able to ever get so large that it matters.
I've opened https://github.com/madsmtm/objc2/pull/567 to fix this, although I'm a bit unsure what the right approach is. In the meantime the easiest fix for you is probably to do one of:
patch.crates-io
Cargo.toml key).objectAtIndex:
.Thanks for the quick response. I took a local copy of the repo and did a quick hack equivalent to #567 that avoided the problem and I'll try taking a Git dependency on #567 for now.
I'm exposing this Rust function to Swift:
I call it like this from the Swift side:
But the Rust panics:
I think this is telling me that Swift arrays and objc2's arrays don't agree on signed vs unsigned?