Vector35 / Vector35/binaryninja-api
Better Swift support
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
What is the feature you'd like to have?
Binary Ninja should:
- automatically parse Swift metadata
- add native support for Swift fundamentals (String)
- add Swift's weird calling conventions (this already has an issue)
- automatically fix up common Swift patterns (e.g. turning Swift strings into Objective-C strings)
Is your feature request related to a problem?
Swift code is currently a mess. This can be seen any time a Swift String is converted to CFString: It's rendered in Binary Ninja as a call with no parameters returning void *. This is clearly not ideal, especially for things like Swift code that uses Objective-C functions with string literals.
Are any alternative solutions acceptable?
There is already a plugin that does some of this, but it can never truly replicate native support.
Additional Information:
Swift embeds an absurd amount of metadata into any binary it creates. This metadata can be used to get back to near source-level quality. It includes extensive type, class, inheritance, and method information. Not using it is a waste.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how Binary Ninja currently represents Swift String-to-CFString conversions and how the existing plugin handles Swift metadata. Define a focused scope across metadata parsing, Swift fundamentals, calling conventions, and common pattern fixups, then verify that Swift code no longer appears as parameterless calls returning void pointers in the described case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100