uniffi-rs
b26889ed - Apply the offset when picking data from a multi-arch file

Commit
103 days ago
Apply the offset when picking data from a multi-arch file In a multi-arch file multiple archs are in the file back-to-back The Mach header tells us at which offset they start, but offsets _within_ that part are not global, but for that part only. Thus we need to pass on the file data from that offset on, otherwise we're looking at random other data. Currently a Mach-O multi-arch file fails to properly parse: Error: finding components in 'your_library.dylib' Caused by: 0: extracting metadata for '_UNIFFI_META_GLEAN_CORE_CUSTOM_TYPE_YOUR_TYPE' 1: Unexpected metadata code: 209 I decided to also add a test that compiles enough C code on-the-fly to generate a library that UniFFI can parse. The test combines two of these libraries into a multi-arch file for parsing and calls the API.
Author
Committer
Parents
Loading