ComputeNode/cyfra
Multi-platform GPGPU computations with Scala, seamlessly 🚀
{ "createdAt": "2020-04-12T11:55:23Z", "defaultBranch": "main", "description": "Multi-platform GPGPU computations with Scala, seamlessly 🚀", "fullName": "ComputeNode/cyfra", "homepage": "", "language": "Scala", "name": "cyfra", "pushedAt": "2025-11-15T22:28:13Z", "stargazersCount": 106, "topics": [], "updatedAt": "2025-11-22T10:22:21Z", "url": "https://github.com/ComputeNode/cyfra"}Library provides a way to compile Scala 3 DSL to SPIR-V and to run it with Vulkan runtime on GPUs.
It is multiplatform. It works on:
- Linux, Windows, and Mac (for Mac requires installation of moltenvk).
- Any dedicated or integrated GPUs that support Vulkan. In practice, it means almost all moderately modern devices from most manufacturers including Nvidia, AMD, Intel, Apple.
Library is in an early stage - alpha release and proper documentation are coming.
Animations
Section titled “Animations”Included Foton library provides a clean and fun way to animate functions and ray traced scenes.
Examples
Section titled “Examples”Ray traced animation
Section titled “Ray traced animation”code (this is API usage, to see ray tracing implementation look at RtRenderer)
Animated Julia set
Section titled “Animated Julia set”Animation features examples
Section titled “Animation features examples”Custom animated functions
Section titled “Custom animated functions”Animated ray traced scene
Section titled “Animated ray traced scene”Coding features examples
Section titled “Coding features examples”Case classes as GPU structs
Section titled “Case classes as GPU structs”Development
Section titled “Development”To enable validation layers for vulkan, you need to install vulkan SKD. After installing, set the following VM option:
-Dio.computenode.cyfra.vulkan.validation=trueIf you are on MacOs, then also add:
-Dorg.lwjgl.vulkan.libname=libvulkan.1.dylib-Djava.library.path=$VULKAN_SDK/lib