Wayland McWayface tutorial project done, feedback on jextract

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Mar 4 11:01:25 UTC 2019


On 04/03/2019 10:26, Mark Hammons wrote:
> One last question. As I mention in my readme, I've written a binding 
> for stdlib's setenv function in scala as opposed to getting jextract 
> to generate it for me (because of the concerns I voiced before). It's 
> in the package usr.include in the scala source code. Is it necessary 
> that I define the header file at all in these bindings? I'd imagine 
> I'd normally have to include the library to link against (but it's not 
> necessary since it's part of libc), but if I can leave out the header 
> annotation it's easier to make semi-platform independent bindings like 
> what I could do with jnr. 

Two answers here. In the long run, it is very likely that, as Panama 
gets mature, we'll start seeing 'official' stdlib and/or posix Java 
libraries (maybe in the JDK, maybe not).

Another answer - it will eventually be possible to go 'lower level' and 
obtain method handles to model native function calls programmatically, 
w/o necessarily going through an annotated interface, using just the 
Layout API. I will share more on that story at a later point, but stay 
tuned.

Maurizio





More information about the panama-dev mailing list