Installation
Julia package
Lava is not yet in the General registry. Install directly from the repository:
import Pkg
Pkg.add(url="https://github.com/SimonDanisch/Lava.jl")Once tagged it will be installable via Pkg.add("Lava").
System requirements
- Julia 1.12 or newer (Lava itself supports 1.11, but the required Raycore dep is gated on 1.12)
- A Vulkan 1.2+ driver with the
bufferDeviceAddressandvariablePointersfeatures. Any recent NVIDIA, AMD, Intel, MoltenVK (macOS), or lavapipe ≥ 24.x driver qualifies. - For ray tracing: a driver exposing
VK_KHR_ray_tracing_pipelineandVK_KHR_acceleration_structure. Software RT works via lavapipe's emulation, but RADV / NVIDIA give real hardware BVH traversal. - For graphics: an X11 or Wayland display server, and GLFW build dependencies — on Debian-likes:
apt-get install xorg-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev mesa-utils
Headless servers without DISPLAY can run Lava under xvfb-run:
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project ...This is exactly how the CI runs the test suite.
Verify the install
using Lava
ctx = Lava.vk_context()
@show ctx.device_name
@show ctx.rt_pipeline_properties !== nothingA successful run prints the chosen GPU and whether hardware ray tracing is available. Anything else (driver missing, surface-extension errors, validation messages) points to a system-level issue — see Debugging.
Picking a device
If multiple Vulkan devices are present, Lava picks the first discrete GPU by default. To choose another, build the context yourself with a select function — it receives the enumerated physical devices and returns one:
using Lava
ctx = Lava.VkContext(select = devs -> only(filter(Lava.islavapipe, devs)))
b = LavaBackend(ctx) # a backend pinned to that deviceVkContext(; select) returns the context without installing it as the process default, so this is also how two devices are held open at once (see test/twodevice_probe.jl).
To match by name, write the predicate against Vulkan.get_physical_device_properties(d).device_name — "NVIDIA", "RADV", "Intel", "llvmpipe", "lavapipe", "MoltenVK" are the usual substrings.