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

feature: non-api adds non-API items to bindings #237

Merged
merged 8 commits into from
May 11, 2024
Merged

Conversation

CGMossa
Copy link
Member

@CGMossa CGMossa commented May 9, 2024

This adds the ability to generate bindings that includes non-API items.

There are several reasons for this

  • Developer debugging As R-core is marking more items as non-API,
    it might be desirable to have a feature to allow for experimenting.

  • It is only CRAN, and only a "NOTE": You might have good reasons for including aforementioned non-API items, therefore, these may be argued for.

  • libR-sys should not solely be aiming to target CRAN, extendr (extendr-api) crates.. and more or less aim to serve as a sys-crate to R API in general.

Note that these bindings are not cached, which means, to include non-API items, your system
must be setup to generate these bindings somehow.

Therefore, to generate these bindings you must enable this feature in the Cargo.toml, e.g.

libR-sys = { version = "*", features = ["non-api", "use-bindgen"] }

CGMossa added 2 commits May 10, 2024 22:37
allo non-api items to be part of the
generated bindings. These bindings
are not cached.
@CGMossa CGMossa requested a review from Ilia-Kosenkov May 11, 2024 06:18
@CGMossa
Copy link
Member Author

CGMossa commented May 11, 2024

I've rebased, which broke this feature. Then I fixed it, and I've added the non-api feature to the test API.

This is now ready for review. Let me know what you think.

@CGMossa CGMossa merged commit 09d76ad into master May 11, 2024
@CGMossa CGMossa deleted the include_nonapi branch May 11, 2024 07:34
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.

2 participants