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

FFI & C header parsing #83

Open
KaruroChori opened this issue Jan 13, 2025 · 1 comment
Open

FFI & C header parsing #83

KaruroChori opened this issue Jan 13, 2025 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@KaruroChori
Copy link
Owner

One of the ways in which vs is expected to work, is to pass one or more libraries as part of the application definition.
Those will be dynamically linked, and vs provides a runtime to express their UI.
Clearly this mode of operation is unsafe, so specific policy restrictions might prevent that.

Implementation-wise, this implies:

  • dl with dlopen and dlsym to handle symbols.
  • an FFI library so that calls can be constructed at runtime. libffi is the one I picked
  • runtime support in the different backends to glue together types with the FFI library, to be implemented
  • something able to parse the C header files into an intermediate form so that I can use that information in each backend.

The last point is the one which is totally unresolved.
Ideally it should be a library able to parse C headers, including the pre-processor stage, and return some kind of usable data structure (ast, whatever) to be used by all the backends.
Any idea would be very appreciated.

@KaruroChori KaruroChori added enhancement New feature or request help wanted Extra attention is needed labels Jan 13, 2025
@KaruroChori
Copy link
Owner Author

For my future reference, but no answer yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant