{"id":27940510,"url":"https://github.com/khronosgroup/anari-sdk","last_synced_at":"2025-10-10T05:03:24.195Z","repository":{"id":37879578,"uuid":"422605780","full_name":"KhronosGroup/ANARI-SDK","owner":"KhronosGroup","description":"ANARI Software Development Kit (SDK)","archived":false,"fork":false,"pushed_at":"2025-05-01T17:42:10.000Z","size":5322,"stargazers_count":255,"open_issues_count":8,"forks_count":38,"subscribers_count":20,"default_branch":"next_release","last_synced_at":"2025-05-01T18:39:10.632Z","etag":null,"topics":["3d-graphics","3d-rendering","3d-visualization","c","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhronosGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-29T14:28:32.000Z","updated_at":"2025-05-01T17:42:16.000Z","dependencies_parsed_at":"2024-01-17T00:04:48.871Z","dependency_job_id":"b1857432-92f7-4af7-8338-0d29ca57854f","html_url":"https://github.com/KhronosGroup/ANARI-SDK","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FANARI-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FANARI-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FANARI-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FANARI-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhronosGroup","download_url":"https://codeload.github.com/KhronosGroup/ANARI-SDK/tar.gz/refs/heads/next_release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856565,"owners_count":21814858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-graphics","3d-rendering","3d-visualization","c","cpp"],"created_at":"2025-05-07T10:17:25.524Z","updated_at":"2025-10-10T05:03:24.145Z","avatar_url":"https://github.com/KhronosGroup.png","language":"C++","readme":"![logo](https://github.com/KhronosGroup/ANARI-Docs/blob/main/images/anari_RGB_Mar20.svg)\n\nANARI-SDK\n=========\n\nThis repository contains the source for the ANARI API SDK. This includes:\n\n- [Front-end library + implementation guide](src/anari)\n- [Device implementation utilties for implementations](src/helium)\n- [Example device implementation](src/devices/helide) (not intended for production use)\n- [Example applications](examples/)\n- [Interactive sample viewer](examples/viewer)\n- [Render tests](tests/render)\n- [(experimental) OpenUSD Hydra render delegate plugin](src/hdanari)\n\nThe ANARI specification can be found on the Khronos website\n[here](https://www.khronos.org/registry/ANARI/).\n\nThe SDK is tested on Linux, but is also intended to be usable on other operating\nsystems such as macOS and Windows.\n\nIf you find any problems with the SDK, please do not hesitate to\n[open an issue](https://github.com/KhronosGroup/ANARI-SDK/issues/new) on this\nproject!\n\n## Getting the SDK from vcpkg\n\nThe ANARI-SDK is available as the `anari` package in\n[vcpkg](https://vcpkg.io/en/). Simply follow [these\ninstructions](https://vcpkg.io/en/getting-started) for setting up your\nenvironment to use vcpkg, then run the following to get ANARI:\n\n```bash\n% vcpkg install anari\n```\n\n## Building the SDK from source\n\nThe repository uses CMake 3.11+ to build the library, example implementation,\nsample apps, and tests. For example, to build (must be in a separate directory\nfrom the source directory), you can do:\n\n```bash\n% cd /path/to/anari\n% mkdir build\n% cd build\n% cmake ..\n```\n\nUsing a tool like `ccmake` or `cmake-gui` will let you see which options are\navailable to enable. The following CMake options are offered:\n\n- `BUILD_SHARED_LIBS`   : build everything as shared libraries or static libraries\n- `BUILD_CAT`           : build the capability analysis tool\n- `BUILD_CTS`           : build the conformance test suite\n- `BUILD_TESTING`       : build unit and regression test binaries\n- `BUILD_HELIDE_DEVICE` : build the provided example `helide` device implementation\n- `BUILD_REMOTE_DEVICE` : build the provided experimental `remote` device implementation\n- `BUILD_EXAMPLES`      : build example applications\n- `BUILD_VIEWER`        : build viewer too (needs SDL3) if building examples\n- `BUILD_HDANARI`       : build (experimental) OpenUSD Hydra delegate plugin\n\nOnce built, the library can be installed via the `install` target created by\nCMake. This can be invoked from your build directory with (on any platform):\n\n```bash\n% cmake --build . -t install\n```\n\n## Using the SDK after install with CMake\n\nThe ANARI SDK exports CMake targets for the main front-end library and utilities\nhelper library. The targets which are exported are as follows:\n\n- `anari::anari`        : dynamically link the main ANARI API library target\n- `anari::anari_static` : statically link the main ANARI API library target\n- `anari::helium`       : library containing base device implementation abstractions (static)\n\nThese targets can be found with CMake via `find_package(anari)`. The examples\nare written such that they can be built stand alone from the SDK source tree.\nThe simplest usage can be found [here](examples/simple).\n\nNote that `anari::helium` will still require linking either `anari::anari` or\n`anari::anari_static` to give consumers the option whether to link the ANARI\nAPI dynamically or statically.\n\nThe following additional helper library components can be requested by listing\nthem under `find_pacakge(anari)`:\n\n- `viewer` : Source library target `anari::anari_viewer` for building small viewer apps\n- `code_gen` : Enable the use of code generation CMake functions downstream\n\nBoth of these libraries are optionally installed and are not available to\ndownstream projects unless they are explicitly requested. To request one of\nthese components, simply add them to the `COMPONENTS` portion of `find_package`:\n\n```cmake\nfind_package(anari COMPONENTS viewer code_gen)\n```\n\n## Running the examples\n\nThe basic tutorial app (built by default) uses the `helide` device as an\nexample, which can be run with:\n\n```bash\n% ./anariTutorial\n```\n\nNote that running the tutorial will require that the `helide` device is enabled\nin your build with the CMake option `BUILD_HELIDE_DEVICE=ON`.\n\nThe viewer application (enabled with `BUILD_VIEWER=ON`) by default uses the\n`environment` library, which reads `ANARI_LIBRARY` as an environment variable to\nget the library to load. For example it can be run with:\n\n```bash\n% export ANARI_LIBRARY=helide\n% ./anariViewer\n```\n\nAlternatively, either `--library` or `-l` can be used on the viewer's command\nline to override the ANARI library to be loaded.\n\nThe regression test binary (`anariRenderTests`) used to render the test scenes\nwithout a window (results saved out as PNG images) uses the same mechanisms as\nthe viewer to select/override which library is loaded at runtime.\n\n## Available implementations\n\n### SDK provided example implementation\n\nAn example device implementation [helide](src/devices/helide) is provided as a\nstarting point for users exploring the SDK and for implementors to see how the\nAPI might be implemented. It implements a very simple ray tracing implementation\nusing Embree for intersection. Users should look to use vendor provided,\nhardware-optimized ANARI implementations which are shipped independently from\nthe SDK. (see below)\n\n### Using the debug device layer\n\nThe ANARI-SDK ships with a [debug layer](src/devices/debug) implemented as an\nordinary `ANARIDevice` which wraps a device (set as the `wrappedDevice`\nparameter on the debug device). This device uses the object queries reported by\nthe wrapped device to validate correct usage of object subtypes, parameters, and\nproperties, as well as validate correct object lifetimes. The wrapped device is\nthen used to actually implement the ANARI API to allow applications to still\nfunction normally.\n\nThe device can be created by using the normal library loading mechanics using\n`anariLoadLibrary(\"debug\", ...)`, creating a the debug device instances with,\n`anariNewDevice(debugLibrary, \"default\")`, and then creating a device to use\nand set it on the device with\n`anariSetParameter(debugDevice, \"wrappedDevice\", ANARI_DEVICE, \u0026wrappedHandle)`.\n\nAs a convenience, users can use the `ANARI_DEBUG_WRAPPED_LIBRARY` environment\nvariable to have the debug device do the mechanics of loading and creating the\nunderlying wrapped library. For example, you can do the following to run the\nviewer with the debug device wrapping `helide`:\n\n```\n% ANARI_LIBRARY=debug ANARI_DEBUG_WRAPPED_LIBRARY=helide ./anariViewer\n```\n\nOr using the `-l` syntax for specifying the library:\n\n```\n% ANARI_DEBUG_WRAPPED_LIBRARY=helide ./anariViewer -l debug\n```\n\nSee the [simple debug device turorial](examples/simple/anariTutorialDebug.c) for\nhow to setup the debug device without using environment variables.\n\nNote that if `ANARI_DEBUG_WRAPPED_LIBRARY` is set, it will take priority over\nprogramatically set wrapped devices.\n\nTracing features of the debug device can be set using the following environment\nvariables:\n- `ANARI_DEBUG_TRACE_MODE` sets the tracing mode, only `code` is supported for now.\n- `ANARI_DEBUG_TRACE_DIR` set the folder where the trace will be dumped.\n\n### (Unofficial) list of actively developed ANARI implementations\n\n- [Barney](https://github.com/ingowald/barney) (MPI distributed renderer)\n- [ANARI-PTC](https://github.com/ingowald/ANARI-PTC) (MPI distributed adapter device)\n- [Cycles (Blender)](https://github.com/jeffamstutz/anari-cycles)\n- [Intel OSPRay](https://github.com/ospray/anari-ospray)\n- [NVIDIA USD](https://github.com/NVIDIA-Omniverse/AnariUsdDevice)\n- [NVIDIA VisRTX + VisGL](https://github.com/NVIDIA/VisRTX)\n- [Visionaray](https://github.com/szellmann/anari-visionaray)\n- [VTK-m](https://github.com/dpugmire/anari-library-vtkm)\n\nIf you implement a backend to the ANARI SDK, please open a PR to add it to this\nlist!\n\n### list of ANARI implementations no longer maintained\n\n- [AMD RadeonProRender](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderANARI)\n\n## ANARI-enabled applications\n\n### Publicly available applications + libraries using ANARI\n\n- [Blender](https://www.blender.org/) (via [addon](examples/blender) found in the ANARI-SDK)\n- [COVISE](https://www.hlrs.de/solutions/types-of-computing/visualization/covise)\n- [HayStack](https://github.com/ingowald/hayStack)\n- [OVITO](https://www.ovito.org/)\n- [OpenUSD](https://openusd.org/release/index.html) (via [hdAnari](src/hdanari) plugin found in the ANARI-SDK)\n- [pynari](https://github.com/ingowald/pynari) (Python language bindings)\n- [TSD](https://github.com/NVIDIA/VisRTX/tree/next_release/tsd)\n- [Vistle](https://vistle.io/)\n- [VTK](https://vtk.org/)\n- [Viskores](https://github.com/Viskores/viskores) (formerly known as VTK-m)\n- [ANARI-Java](https://bitbucket.org/Eclesia/anari-java/src/main/) (Java language bindings)\n\n### Integrations in-progress\n\n- [Ascent](https://ascent.readthedocs.io/en/latest/)\n- [ParaView](https://www.paraview.org/)\n- [VisIt](https://visit-dav.github.io/visit-website/index.html)\n- [VMD](https://www.ks.uiuc.edu/Research/vmd/)\n\nIf you integrate ANARI into your application, please open a PR to add it to this\nlist!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fanari-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhronosgroup%2Fanari-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fanari-sdk/lists"}