generate bridge header file - #246
Closed
Mrmaxmeier wants to merge 11 commits into
Closed
Conversation
Collaborator
|
Hi @Mrmaxmeier — can you explain a bit about the motivation for this PR? Is it basically adding the glue needed so that the Tectonic engine can be invoked from C as a library? (If so, that's great and would be a great feature to have!) |
Codecov Report
@@ Coverage Diff @@
## master #246 +/- ##
==========================================
+ Coverage 39.61% 39.71% +0.09%
==========================================
Files 135 135
Lines 59489 59646 +157
==========================================
+ Hits 23568 23687 +119
- Misses 35921 35959 +38
Continue to review full report at Codecov.
|
Mrmaxmeier
force-pushed
the
bindgen
branch
2 times, most recently
from
January 2, 2019 00:43
1f90cae to
055ae54
Compare
The C code expects the pointers to be mutable, but cbindgen generates `const X*` for `*const X`.
Most changes to the bridge API should trigger regeneration of the headers.
This reveals an legitimate problem with pdf_copy_clip.
Collaborator
|
Done in #643! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This generates a c header file using https://github.com/eqrion/cbindgen. cbindgen automagically includes all public C-representable types as well as primitive constants. This should reduce duplicate type declarations and removes some unsafe typecasts.
🚧 WIP 🚧
Unresolved stuff:
This depends on Skip lifetime type args mozilla/cbindgen#216. Preserve fn type argument names mozilla/cbindgen#217 would be nice too.PRs have been merged upstream.Including rustfmt-related stuff in this PR is awkward.The codebase has been rustfmt'd.pdf_copy_clip) should be dealt with. A treatment like Remove PSTricks functionality #238 might be appropriate.cbindgenintroducesserdeas a dev dependency. This breaks thealpine-linux-musltarget.