libzt
libzt copied to clipboard
Maven Repository
Request: It would be wonderful if java / clojure programmers could use this via a maven repository. I would be willing to put up some money for a bounty. I know javafx and sqlite provide similar cross-platform maven artifacts.
I like this idea. I'll look into the requirements next week and take it into consideration.
New API docs are now live: http://docs.zerotier.com/libzt-java. I'll be doing a little webinar on Jun 2nd to answer questions, lend some help and discuss any feature requests people have. Sign up page is here
examples/java/Example.java has also been updated to take advantage of the refreshed API. The maven package isn't here yet but it's getting closer now that things have been brought up to date.
There's a new workflow file .github/workflows/jar.yaml that builds the JAR on ubuntu-latest
. I plan to add support for other platforms but at least now it's easier to build.
Any updates here? I tried to compile it on windows but got the following error
D:\a\libzt\libzt\ext\ZeroTierOne\osdep\OSUtils.hpp(46,10): fatal error C1083: Cannot open include file: 'nlohmann/json.hpp': No such file or directory [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]
D:\a\libzt\libzt\src\bindings\java\JavaSockets.cxx(392,38): error C2039: 's_addr': is not a member of 'zts_in_addr' [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]
D:\a\libzt\libzt\src\bindings\java\JavaSockets.cxx(392,48): error C2660: 'memcpy': function does not take 2 arguments [D:\a\libzt\libzt\cache\win-x64-jni-release\zt_pic.vcxproj]
action log: https://github.com/IceSoulHanxi/libzt/actions/runs/6708859892/job/18230601167 workflow file: https://github.com/IceSoulHanxi/libzt/blob/win-build/.github/workflows/jar.yaml
Second and third errors should be an easy fix by replacing s_addr
with S_addr
in an #if defined (_WIN32)
block.
https://github.com/zerotier/libzt/blob/2f0f25a15870ac0ae52815558c539e63d656d506/include/ZeroTierSockets.h#L497
For some reason json support is not disabled on Windows, I assume setting the OMIT_JSON_SUPPORT
flag would fix the other issue.
https://github.com/zerotier/libzt/blob/2f0f25a15870ac0ae52815558c539e63d656d506/CMakeLists.txt#L357