-
Notifications
You must be signed in to change notification settings - Fork 28
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 a plugin system #4
Comments
The way I would go about it is the following: Each clang-repl plugin provides a shared object (dynamic library) installed in the standard location ( Each plugin gets installed with a "manifest" in const char* name = plugins["clad"]; // get the library to be loaded for the clad plugins
void* handle = dlopen(name); // load the library
if (handle != NULL)
{
func* setup = dlsym(handle, "load");
if (load != NULL)
{
int ret = setup(interpreter); // setup the plugin, passing e.g. the interpreter instance to the setup function.
return 0;
}
}
return 1; This can obviously be a lot more advanced. Plugins can provide more functions, be listed by listing the items in the |
@SylvainCorlay, in our last meeting you said you already had implementation of that system for some other project. If it is open source could you point it to us as it seems that @mvassilev wants to look into this issue. |
Hey @vgvassilev. The timing is almost perfect. @DerThorsten just pushed out the first replease of xplugin. |
Xeus-cpp should be able to attach clang-repl and other plugins such as clad or cppyy. We should investigate and implement plugin-system which is friendly to package managers.
@SylvainCorlay, you had a concrete proposal for directory structure that we wanted to adopt. Could you spell it out here?
cc: @alexander-penev, @grimmmyshini
The text was updated successfully, but these errors were encountered: