Skip to content

New chapter about calling existing external C libraries #243

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

Closed
pykoder opened this issue Sep 18, 2014 · 2 comments
Closed

New chapter about calling existing external C libraries #243

pykoder opened this issue Sep 18, 2014 · 2 comments

Comments

@pykoder
Copy link

pykoder commented Sep 18, 2014

I've a real life example in mind: I would like to create some example showing how to call libpng from rust to create (some simple) images.

I could probably manage to do that for calling unix version of library. But I have no clue on how to do that in a windows environment (actually I do not have any windows OS available).

@japaric
Copy link
Member

japaric commented Sep 26, 2014

New chapter about calling existing external C libraries

There's already a FFI chapter about this topic, but the chapter still needs lots of work.

I've a real life example in mind: I would like to create some example showing how to call libpng from rust to create (some simple) images.

There are rust bindings to libpng. I bet you could learn a lot by checking that library.

But I have no clue on how to do that in a windows environment (actually I do not have any windows OS available).

Well, I expect that binding the library in windows is similar to how it's done on linux. But I haven't tried this before, in fact I haven't tried Rust in windows at all. So I can't give you pointers in this area.

(AFAIK Rust development ond Windows is not "smooth" at the moment, but that will get fixed by the 1.0 release.)

@steveklabnik
Copy link
Member

Given that the FFI chapter exists, I'm giving this a close. Specific improvements would be welcome.

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

No branches or pull requests

3 participants