-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implement C wrappers #359
Comments
Thanks for your proposal. IMO it is always better to keep the wrapper separate from your application, so that other people could benefit from it and contribute. I have no experience in writing C wrappers but it will be necessary to define a C API for Lomse and there could be problems with smart pointers, std strings or other, as well as with exceptions. Perhaps it will be necessary to remove exceptions from Lomse or to create in the C wrapper an additional layer of C++ that handles exceptions. I like the idea and will try to help with any convenient changes in Lomse. The C wrapper is also an opportunity to improve the C++ API and will help to define public and private lomse headers. I would start the C wrapper in a separate repo (either in your account, in Lenmus account or in any other place, I don't mind), to gain experience and knowledge about its viability, the C API, the required changes in Lomse, etc. And once we are sure, we could decide if it should be integrated in Lomse repo or maintained as a separate repo. A naive question: Any gain in merging in Lomse repo? I only see an increment in Lomse sources without any gain for people don't using the C wrapper, but as said, I have no experience on this. |
Thank you for your answer. I might give a try depending on how much time I can spend on this.
It would ensure that the C wrappers would fit the C++ API. A separate project could be outdated if the C++ API changes. |
Time is always the problem! ;)
Depends on how repos are related and on automated test before merging Lomse PRs. Let me think on this. |
Providing a C wrapper would be fantastic. I would like to use Lomse within a project developed in the D Programming Language. By providing a C wrapper you would open the door to almost any programming language. |
Probably, but first there must be team of contributors to develop and maintain the project. I can not do more alone. Feel free to contribute to develop the C wrapper or to do any other task. |
Thanks for the info. My C knowledge is quite limited and my C++ knowledge is even worse. |
Thank you for the info. I know nothing about SWIG and probably could be of help. But for sure implementing a C wrapper, even using SWIG, will require an amount of work that, currently, I can not afford. Think that, even having good knowledge of SWIG (and it this is not the case), just testing the Lomse C wrapper and writing automated tests and documentation will be a lot work. |
I would like to use lomse in a GTK C program. I could implement C wrappers for lomse in my application, but maybe it would be better to implement them directly in lomse so other people could use them.
What do you think?
The text was updated successfully, but these errors were encountered: