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

Add example of FFI with interop between Rust and C. #33

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

davidzchen
Copy link
Member

No description provided.

@davidzchen
Copy link
Member Author

Depends on #34

@davidzchen
Copy link
Member Author

+cc @acmcarther @mattmoor

@@ -0,0 +1,124 @@
// Copyright 2017 The Bazel Authors. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this original code? can we just vendor existing code for those kind of examples?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is original code. I wanted a small example that tested an interesting set of FFI features, such as wrapping a C struct rather than just an opaque pointer, making a safe Rust wrapper over the C API, etc. I'm planning to reuse this example elsewhere, such as for rules_d, etc.

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

Successfully merging this pull request may close these issues.

None yet

3 participants