SQLite Forum

Loading bundled extensions in dotnet on linux
Login
Sorry for the late reply.

How can I do that without hardcoding a path?

I know I could find some way to make sure the path is right in an installation, but it feels somewhat fragile.

It would be something like:

 - find out where the executable is (run-time);
 - find out on which OS I'm running on (run-time);
 - find out the architecture I'm running on (run-time);
 - build a path based on hardcoded values (compile-time).

This is IMHO very bad from the maintenance POV (nothing stops a minor sqlite update that doesn't change the *public* interface from changing those paths and crashing my distribution: that code would be relying on an implementation detail).

I think there should be a reasonably safer way to do that, otherwise, those extensions are mostly useless.