venus2wasm is a C library and CMake package for browser-side Wasm clients that use a Venus bridge to execute against host Vulkan.
Disclaimer
- Repository name includes
venus, but current implementation uses a custom transport. - Target direction is to replace the custom transport with Venus transport/runtime.
- If project direction changes and Venus integration is dropped, repository naming will be updated.
Runtime pipeline
Browser Wasm client -> Venus transport -> Host Venus server -> Host Vulkan API
- Wasm app issues guest Vulkan calls and sends control payload over websocket (
/venus). - Host Venus server executes native Vulkan on host driver and renders RGBA frames.
- Host streams binary
V2FRframes over websocket frame lane (/venus?channel=frame). - Browser receives frames in JS as
ArrayBuffer(frame path bypasses Wasm heap). - JS presenter uploads pixels to canvas via WebGL texture update (
texSubImage2D).
Localhost benchmark, strict host-frame mode, 1920x1080.
Hardware used for numbers below:
- CPU:
AMD Ryzen 5 5600G with Radeon Graphics(6C/12T) - RAM:
63.8 GiB(~64 GB) - OS:
Microsoft Windows 11 Pro(10.0.26200, build26200,64-bit) - GPU:
NVIDIA GeForce RTX 4070(driver32.0.15.8142)
Measured throughput:
- Full frame raw RGBA lane:
~57.8 fps,~456.9 MB/swire throughput. - Live demo status can peak around:
- browser
~400 MB/s - host
~1600 MB/s
- browser
Public CMake target
venus2wasm::venus2wasm
Public headers
include/venus2wasm/venus2wasm.hinclude/venus2wasm/v2w_guest_vulkan.h
docs/getting-started.mdfor build, install, and CMake consumption.docs/runtime-api.mdfor the public C API surface.docs/tools.mdfor helper CLIs and demo tooling scripts.docs/browser-demo.mdfor the browser Wasm demo lane.docs/wasm-toolchain.mdfor emsdk and toolchain behavior.
This project is licensed under GNU AGPL v3.
For dual licensing including proprietary or commercial terms contact Devsh Graphics Programming.
