Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Automatic binding generation? #147

Open
frewsxcv opened this issue Nov 26, 2016 · 4 comments
Open

Automatic binding generation? #147

frewsxcv opened this issue Nov 26, 2016 · 4 comments

Comments

@frewsxcv
Copy link
Contributor

PyObjc (and possibly RubyCocoa?) use .fwinfo files to generate language bindings around Cocoa and similar objective C libraries:

https://bitbucket.org/ronaldoussoren/pyobjc/raw/6b74fc7e1ba0995038dc5c1f162d1fad860ff175/pyobjc-framework-Cocoa/metadata/raw.AppKit/x86_64-10.10.fwinfo

From what I can tell, PyObjC uses a tool called objective.metadata to generate these files:

https://bitbucket.org/ronaldoussoren/objective.metadata/src/bd0f1b994403?at=default

Has anyone thought about doing automatic binding generation for cocoa-rs? Anyone know of easy strategies?

@chances
Copy link

chances commented Jan 20, 2017

Is rust-bindgen a good option?

@frewsxcv
Copy link
Contributor Author

It's possible, but I'm familiar with bindgen enough to know for sure.

@emilio
Copy link
Member

emilio commented Jan 20, 2017

You could try with https://github.com/servo/rust-bindgen. I recently made a PR to freetype to do the same (avoiding manual bindings), so probably you could get inspired by the script in there:

servo/rust-freetype#48

I can't do this myself since I don't have an OSX machine.

@nox
Copy link
Contributor

nox commented Feb 27, 2017

Are fwinfo files an Apple thing?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants