Open weebney opened 11 months ago
Thank you for the great suggestion! Do you have a use case that can guide my changing this? Do you prefer a single executable? I believe it may be possible to statically link the dht-indexer-rust.so file so that I don't need to copy it out at runtime, which would be the case if it were embedded. I suspect needing to have dht-indexer-rust.so in the working directory can be an issue for Linux users, is that the case for you?
I'm currently packaging cove for Arch; I'm sure as you know it's the de-facto standard for go programs to be entirely self contained (to cut down on package coupling and make distribution easier) and I think cove would be no exception in benefiting from these perks. It doesn't seem like you use Linux, but the primary use case I can see would be in simplifying the packaging of cove for the various flavors of Linux—not a huge use case I guess, but would help me out and anyone else who packages cove in the future. I can do a PR for this and #5 if you can't be bothered.
I suspect needing to have dht-indexer-rust.so in the working directory can be an issue for Linux users, is that the case for you?
See #5—a bit of a broader issue on Linux than just the library not being in the working directory.
Statically linking rust sqlite extensions is non trivial. 😢
Using the package
embed
to embed "dht-indexer-rust.so" into the binary would prevent having to package the library with the binary as a separate file—this would add minimal complexity to cove but make distribution much easier and cleaner.