Follow

I blame c++ for my degraded sleep quality.

While jextract makes the header translation much easier compared to JNA and JNR, but win32 api still does not work, and c++ support is not good.

The standard header from llama.cpp is working, but other functionalities like grammar parsing and sampling init is not included. They shipped as a common component in the example codes. While I want to compile the example code as a shared lib and invoke them from Java, the jextract has some problems with C++ headers and not happy with it.

For wintun, it uses win32 headers in its header files, which let jextract to process (almost) the whole win32 lib. The pointer size seems to be a problem. One said it should be 32 bits but another said 64 bits.

No wonder it's still in preview stage.

And the most annoying part is the dollar signs used in jextract.

To access a field in a structure, you have to use `llama_grammar_element.type$get(obj)`. And the dollar sign is a keyword in Kotlin. You can't use it in function names, unless you quote it with "`", like "llama_context_params.`seed$get`(contextParams)". And to make things worse, IDEA's auto completion is broken when involving this "`" sign.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.