-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a proposal on how to implement #1 and provide a C API for igvm. The approach taken is to based on using [cbindgen](https://github.com/mozilla/cbindgen) to analyze the rust code and produce header files usable from C. To support this, a set of C friendly functions have been added to `igvm/src/c_api.rs` which allows, at present, binary files to be parsed and processed. The additional functions are hidden behind a rust feature named `igvm-c`. When performing a normal build (without the C API) the only change that has any effect is from the first commit 4da1043 which by necessity relaxes the unsafe_code restriction. Unfortunately this cannot be controlled by the feature. The sample in `igvm_c/sample` and the unit test code in `igvm/tests` are probably the best places to start to see how to use the proposed API from C. --------- Signed-off-by: Roy Hopkins <[email protected]> Signed-off-by: Roy Hopkins <[email protected]>
- Loading branch information
1 parent
a2ce663
commit 4c6ee46
Showing
16 changed files
with
2,076 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.