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

C++ bindings #195

Open
loonycyborg opened this issue Nov 21, 2024 · 4 comments
Open

C++ bindings #195

loonycyborg opened this issue Nov 21, 2024 · 4 comments

Comments

@loonycyborg
Copy link

Although you can just use YS C api from C++, there's some value in easing access to C++ objects from YS code by mapping them to YS concepts somehow, in same way as pybind11 maps C++ objects to python objects.

@ingydotnet
Copy link
Member

Can you tell me more exactly something you'd like to do with YS and c++?

I'm assuming you want to access a shared library from ys code, but maybe it's something else.

@ingydotnet
Copy link
Member

I'll also look at pybind11 for examples

@loonycyborg
Copy link
Author

I want to access api of the program that embeds YS, and also to make particular C++ variables/objects accessible depending on location in the yaml structure.

@loonycyborg
Copy link
Author

In python when you eval something you can provide your own locals and globals, thus you have control on what variables that code piece sees. I'm not sure how easily such control is accessible in YS in general.

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

2 participants