-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use "go:embed" to embed "dht-indexer-rust.so" into go binary #4
Comments
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.
See #5—a bit of a broader issue on Linux than just the library not being in the working directory. |
#5 should be fixed shortly. I think I'll look into statically linking the extension for the longer term. |
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.The text was updated successfully, but these errors were encountered: