tokio-rs / rdbc

Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to dynamically load an RDBC driver

andygrove opened this issue · comments

Currently, it is necessary to statically link to all possible RDBC driver implementations that need to be used at runtime but one of the main benefits of ODBC/JDBC is that new drivers can be loaded at runtime, so we need a similar mechanism here.

Would this be a subclass, or would this be something like libdl that implements dynamic loading of shared libs? I'm not sure if this is supported in Rust, but it's a possible solution. I would think that if the drivers are lightweight enough, they can all be compiled into a single runtime?

It would need to be dynamic loading of shared libs so that a user can use any driver with a product without having to have a version of the product that is compiled against the driver they want to use.

Does anyone really load JDBC drivers at runtime in practice? I always thought that was an obscure thing to do.

Actually, this is very common in desktop products where the user can add new JDBC drivers through the user interface without the need to restart the application.

I see... Like crystal reports