Open SnailQxQ opened 2 months ago
部分代码: List imports = new ArrayList<>(); Imports.Spec abortSpec = new Imports.Spec("env", "abort", new Function<List, List>() { @Override public List apply(List numbers) { return List.of(); } }, Arrays.asList(Type.I32, Type.I32, Type.I32, Type.I32), Collections.emptyList());
imports.add(abortSpec); Module module = new Module(code); Imports importsObject = Imports.from(imports , module); Instance instance = module.instantiate(importsObject); System.out.println(instance);
Instance instance = module.instantiate(importsObject); 报错 Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.wasmer.Imports.nativeImportsInstantiate(java.util.List, long)'
我也参考了 Salpadding/wasmer-jni ,但是用那个包也没传入成功
部分代码: List imports = new ArrayList<>();
Imports.Spec abortSpec = new Imports.Spec("env", "abort", new Function<List, List>() {
@Override
public List apply(List numbers) {
return List.of();
}
}, Arrays.asList(Type.I32, Type.I32, Type.I32, Type.I32), Collections.emptyList());
Instance instance = module.instantiate(importsObject); 报错 Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.wasmer.Imports.nativeImportsInstantiate(java.util.List, long)'