-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
Missing documentation for using Sol to write Lua C libraries #1574
Comments
You're right, we only have 2 One more thing on the list of things to do... |
In my tinkering, I had been compiling my example code as a shared object and let Lua's C library loader find the .so and load it. And of course I'm using CMake to build it. I might clean it up well enough to send you a PR. |
This is a follow-up, and generally a re-opening of this previous issue:
#222
Sol can be used to implement C libraries. I understand from the previous issue linked above it is not the intended scope of Sol, but it is possible and would be helpful to document this unintentional feature.
You will see in my example below that I use existing Sol features and API to implement a C library. In this case, I'm just making some hypothetical C++ functions callable from Lua.
Obviously there's no need to document every scenario and use case (Sol's doc is already quite complete in this respect), but providing a simple demonstration of the capability and a working example would help others.
The text was updated successfully, but these errors were encountered: