nvzqz / swift-bindgen

Bridging the gap between Swift and Rust
Apache License 2.0
150 stars 9 forks source link

Parse framework TBD (yaml) files in swift-bindgen crate #9

Open simlay opened 4 months ago

simlay commented 4 months ago

There's a good chance this isn't the correct approach but I'm gonna give it a try.

I've decided to take a look at the Swift tbd files. These are basically headers for dylibs in yaml form. Things like libswiftCore.tbd have a bunch of mangled names. To demangle the names, I use a swift function to get the demangled name, I call this function from rust but compile the swift source for that in a build script.