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

The generated bindings unintentionally export functions from the C standard libary #98

Closed
yutannihilation opened this issue Feb 17, 2022 · 1 comment

Comments

@yutannihilation
Copy link
Contributor

As we found on #95, half of the functions that libR-sys exports are NOT from R (e.g., lgamma is from <math.h>). I'm saying "half" because the diff on #96 would actually halve the number of exports.

Ideally, we should limit the functions to the extent of "R API." However,

  • It's really difficult to distinguish "R API" programmatically; it requires us to read R Internals eagerly.
  • We actually need "non-API." extendr-engine contains such ones to start and end R.

Besides, it's also difficult to eliminate the C standard library functions properly. The bindgen magically handles macros that define constants and function-likes, however, I cannot find way to do it manually. #96 is my attempt for this, but I'm afraid I cannot finish the PR.

@yutannihilation
Copy link
Contributor Author

Fixed via #96

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

No branches or pull requests

1 participant