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

Optionally generate a "C"-like header with imported items #100

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

stbuehler
Copy link

While adding various bindings and now trying to refactor defining those with macros in openssl-sys I wanted to check what functions I ended up importing (and their expected "C type"), and whether I lost or broke something.

With this a separate C-like file can be generated in build.rs (.out_items("items.h")) and e.g. printed in a separate binary with:

fn main() {
    print!("{}", include_str!(concat!(env!("OUT_DIR"), "/items.h")));
}

This is mostly for debugging / "human" tracking of changes, so I don't see a need to test this.

I also hit a few other minor issues and added fixes, although they all should be independent.

Given syntex_syntax2 is a quite old parser, it doesn't support more
recent syntax (especially macro expansions).

This means API symbols created by macros using new features will not be
tested.

This allows a user to set abort_on_errors, and ctest will fail if the
crate to be tested can't be parsed.
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

Successfully merging this pull request may close these issues.

1 participant