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

java.lang.UnsatisfiedLinkError: Can't load library for M1 machine #4

Open
rehmanmuradali opened this issue Feb 13, 2023 · 2 comments
Open

Comments

@rehmanmuradali
Copy link

I am trying java code given in the example on m1 machine:

try (
                OPAModule om = new OPAModule("/Users/rehmanmuradali/code/bayzat-be-kt/bayzat-backend/hrcore/src/main/kotlin/com/bayzat/hrcore/policy/rego/bundle/policy.wasm");
        ) {
            String input = "{\"user\": \"john\"}";
            String data = "{\"role\":{\"john\":\"admin\"}}";

            om.setData(data);

            String result = om.evaluate(input, "example/allowed");

            System.out.println("result=" + result);
        } catch (Exception e) {
            e.printStackTrace();
        }

image

@sangkeon
Copy link
Owner

It looks like wasmtime-java issue.

Refer kawamuray/wasmtime-java#36.

Compiling a subproject(JNI based) of a wasmtime-java is required.

I don't have any M1 machine, so I can't test the issue right now.

@sangkeon
Copy link
Owner

sangkeon commented Mar 4, 2023

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

2 participants