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

[TRACKER] Binding native app library to embedded scripts #73

Open
KaruroChori opened this issue Dec 18, 2024 · 0 comments
Open

[TRACKER] Binding native app library to embedded scripts #73

KaruroChori opened this issue Dec 18, 2024 · 0 comments

Comments

@KaruroChori
Copy link
Owner

A native application distributed as a dynamic library with main entry-point can be linked against by a vs app by passing the path of the library and the c headers.
For example:

<app link-with.lib="this://native-app/libapp.so" link-with.header="this://native-app/app.h">

The symbols exposed by it should be available (possibly namespaced) to our custom scripts in vs. Most targets will need some translation layer based on libffi, but for tcc-cnative it should be much easier.

Should. Because it requires to:

  • Build and distribute libtcc1.a
  • Link libc which I really don't want
  • Have knowledge of where such library is placed in the host system.

This approach, while feasible, is does not fit well considering the rest of the design objectives, and it does not play well with what will be needed when implementing the same feature in other pipelines.

The suggested approach is to load the dynamic library in memory as a cached asset, and parse its list of symbol to expose explicitly when building the embedded script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant