Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift binding #1707

Merged
merged 3 commits into from
Nov 25, 2020
Merged

Swift binding #1707

merged 3 commits into from
Nov 25, 2020

Conversation

zydeco
Copy link
Contributor

@zydeco zydeco commented Nov 22, 2020

I've been working on a Capstone binding for Swift: capstone-swift.
Due to how Swift packages work, it must be in its own repository.

This required some additions to the const generator script to map constants in a more swift-like way:

  • Export related constants as an enum or OptionSet
  • Rename using Swift naming conventions
  • Swift enum values must be literals

These changes don't affect other bindings, but if it's inconvenient to have so much code in the const generator script only for Swift, I can keep it in my own repo.

* groups constants by enum
* use pascal case for enum names
* use camel case for enum values
* values are always literals
* add extra options for some enums
* use different types for some enums
* generate option sets instead of enums for some types
* renaming constants according to regex pattern
@XVilka
Copy link
Contributor

XVilka commented Nov 25, 2020

Would be a perfect addition to a possible "capstone-project" GitHub organization if @aquynh decides to make it happen: #1319 (comment)

@aquynh aquynh merged commit 6d5d982 into capstone-engine:next Nov 25, 2020
@aquynh
Copy link
Collaborator

aquynh commented Nov 25, 2020

merged, thanks!

@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants