Finished part 1 of the Wayland McWayface tutorial of Drew DeVault - Issue with spi toolprovider interface and jextract

Mark Hammons mark.hammons at inaf.cnrs-gif.fr
Sat Feb 23 23:26:54 UTC 2019


Hi all,

I've finally written a working implementation of the first part of Drew 
DeVault's tutorial, and I wanted to put it here first to get your feedback

https://github.com/markehammons/Wayland-McWayface_JVM-edition/tree/Part1

I've tried using the new forked scopes in the recent release, but I 
frequently hit issues of being unable to use pointers I need to use. 
This usually happens with the allocated callbacks, so I assume I could 
merge said callback's pointers into the scope of what they're being 
assigned to, but I haven't tried that yet. The struct issue I reported 
earlier continues to plague me, and has resulted in me writing a few 
workaround classes in java. Also, I allocated a c_array to communicate 
with a function call but is there no way to just pass in a regular java 
array at this time?

Finally, and this is the biggest issue, I cannot get jextract working 
via the spi.ToolProvider interface. If you look at the build.sbt in the 
root of my project, I have defined a task binding for jextract to be 
called and configured by sbt without having to call outside of the JVM. 
When I tried this with jlink 
(https://gist.github.com/markehammons/42d75709e060625f1a663b442842b461) 
it worked fine, and spi.ToolProvider says it's finding jextract, 
jextract is just not doing anything. I'm guessing the jextract tool 
isn't hooked into ToolProvider yet?

Anyway, tell me if you have any suggestions to improve my usage of the 
foreign APIs in this project. And especially tell me if I can get 
jextract working through the ToolProvider interface. I'd love to start 
developing sbt and mill plugins for projects to bind native code with, 
but I can't till that gets worked out.

Thanks,

Mark




More information about the panama-dev mailing list