Provide a way to use libmysqld instead of libmysqlclient.
As per https://mariadb.com/kb/en/mariadb/embedded-mariadb-interface/.
It would be really convenient for testing to have a way to use the embedded server.
Let me know if I can help in implementing it, if you have some pointers. I'm not sure where I would start and how it should be structured, etc.
For now this kind of functionality isn't on the roadmap. Currently I manually strip out most of the server-related code, however since the async features from libmariadbclient are now more widespread, we can probably just stop bundling libmariadbclient entirely and just load it as a shared library instead. This would make the code base smaller, improve maintainability, and allow features like the one you are requesting.
I can't guarantee when these kinds of changes will be made, but I am always open to pull requests to incorporate such changes.
How would you imagine that a feature like this should work? Perhaps it makes more sense to have it as a completely separate module, and split the nodejs code into a "core" lib that both the client and daemon versions could depend on.
How about exposing a flag to the build process that tells it to link to a shared libmariadbclient instead of building the bundled one?
If we're going to open up to or change to linking with the shared library, I'd rather just remove the bundled libmariadbclient source because it does take up a considerable amount of space.
@mscdex I'm happy to see it go.
I think one of the major obstacles to removing the source from the repo is Windows users. They typically can't just apt-get install libmariadbclient-dev. How would we support them? Require them to have the libmariadbclient DLLs in the system path? Download the libmariadbclient DLLs from the repo (but not packaged in npm) before building? Something else?