Skip to content
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

Make loading of ironoxide library easier for developers consuming the SDK #7

Open
ernieturner opened this issue Apr 30, 2019 · 0 comments

Comments

@ernieturner
Copy link
Contributor

Instead of making ironoxide-java consumers manually call java.lang.System.loadLibrary manually with the name of the ironoxide library, we should wrap that internally and do it similar to how it works with loading NaCl. Their code automatically attempts to find the library in various paths and loads it for the caller.

private static final class SingletonHolder {
    public static final Sodium SODIUM_INSTANCE =
            LibraryLoader.create(Sodium.class)
                    .search("/usr/local/lib")
                    .search("/opt/local/lib")
                    .search("lib")
                    .load(LIBRARY_NAME);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant