Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java implementation or bindings ? #261

Open
jsorel opened this issue Nov 13, 2024 · 3 comments
Open

Java implementation or bindings ? #261

jsorel opened this issue Nov 13, 2024 · 3 comments

Comments

@jsorel
Copy link

jsorel commented Nov 13, 2024

Hello,

I've been searching for an ANARI implementation or at least a binding for Java, but could not find any.

Have any links or informations ?

Thanks

@jeffamstutz
Copy link
Contributor

Hi, sorry for the late reply!

We don't have any language bindings for anything beyond Python, but would welcome a PR if someone were to make them! I personally don't have any experience binding C to Java, so if you have pointers that would be helpful.

@jsorel
Copy link
Author

jsorel commented Jan 9, 2025

I can give it a try, using Java Panama.
but I need the C header files that must be used and a doc on how to install an anari compliant engine on linux.

@jeffamstutz
Copy link
Contributor

The main C header can be found here, which gets installed to ${CMAKE_INSTALL_PREFIX}/include/anari.

By default, a very simple CPU-only engine comes with the SDK called helide (enabled with BUILD_HELIDE_DEVICE in CMake). Any of the other engines you can find (list here) is a matter of building them against your install of ANARI-SDK and then installing them in a place loadable by the main front end library. "Loadable" means either a) the engine library is physically next to the front end library, or b) the system library loader can find it (e.g. LD_LIBRARY_PATH). Basically the front end library just does a dlopen() and follows the rules for that based on whatever platform you are on. Other setups are possible (i.e. static linking), but what I described is the most common way people load engines.

I would expect that the bindings are only built against the front end library, then engines are loaded at runtime (using anariLoadLibrary()) based on whatever users have installed locally. If this approach won't work for whatever reason (or isn't desirable), we can talk through alternatives that will suffice.

Feel free to treat this thread as a Q&A for any issues that come up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants