-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
GraalVM can call code in any supported language from any supported language, and one of the 'languages' is LLVM bitcode.
Compiling Raylib to LLVM bitcode works fine. However we then have some problems:
- Passing a Java string as a function argument doesn't work because it doesn't convert it to a char*.
Context polyglot = Context.newBuilder().
allowAllAccess(true).build();
File file = new File("libraylib.so.3.7.0");
Source source = Source.newBuilder("llvm", file).build();
Value cpart = polyglot.eval(source);
cpart.invokeMember("InitWindow", 300, 300, "foo");
You can also do 'execute' rather than 'invokeMember' but the result is the same:
Exception in thread "main" org.graalvm.polyglot.PolyglotException: com.oracle.truffle.api.dsl.UnsupportedSpecializationException: Unexpected values provided for <core.c:664:29>:664 LLVMI8LoadNodeGen#1: [foo], [String]
3xau1o and tylermasci16