Skip to content

Repository files navigation

nvidia-rs

CI Rust 1.95+ License: MIT OR Apache-2.0 GitHub

Rust integrations for selected NVIDIA graphics SDKs.

Crate crates.io API Documentation
SDK acquisition and SHARC headers nvidia-sdk docs.rs
DLSS / NGX nvidia-dlss docs.rs
NRD nvidia-nrd docs.rs
OMM CPU baker nvidia-omm docs.rs
Streamline nvidia-streamline docs.rs

See the changelog and release checklist.

Note

This project is independently maintained. It is not affiliated with, sponsored by, or endorsed by NVIDIA Corporation.

NVIDIA and the names of its products are trademarks of NVIDIA Corporation.

The repository contains no NVIDIA SDK payloads. Native builds use an explicitly configured SDK or a local cache. They can download a pinned official release when neither is available.

Downloaded SDKs retain their upstream licenses. This project's open-source license does not cover them.

Status

The crates share one SDK resolver and command-line interface. Each integration has its own platform requirements.

Integration Native Support SDK Inputs
DLSS Ray Reconstruction through Vulkan NGX x86-64 GNU Linux Pinned NGX/DLSSD SDK
Streamline x86-64 MSVC Windows Pinned Streamline SDK
NRD RELAX SH x86-64 Linux/Windows; Apple silicon macOS Pinned source archives and dependencies
OMM CPU baker x86-64 Linux/Windows; Intel/Apple silicon macOS Shared libraries on Linux/Windows; pinned sources on macOS
SHARC 1.8.3 Shader headers on all targets Pinned upstream source archive

Unsupported native targets use stub backends. See SOURCE-SDKS.md for exact target rules, native toolchains, and source dependency requirements.

SHARC Headers

SHARC is a shader-only SDK. It does not introduce a renderer abstraction or a native backend.

The resolver returns the official SDK root. Headers are under include/, and the license is License.md.

Tip

Use resolved.path.join("include") as the shader include directory. Point SHARC_SDK at the SDK root, not at include/.

The SHARC source notes record the verified commit and archive pin. They also provide the exact layout and prefetch commands. These inputs are acquired, not vendored here.

Renderer Integrations

nvidia-dlss, nvidia-nrd, and nvidia-streamline enable vk-graph by default. The feature is optional. Disable default features to use the underlying ash/Vulkan APIs without a vk-graph dependency.

OMM and the SDK resolver are renderer-independent. Neither has a vk-graph feature.

The default dependency graph requires Rust 1.95 or newer.

Graph-Free Configuration

Use this crates.io configuration for graph-free Vulkan integration:

[dependencies]
nvidia-dlss = { version = "0.1.0", default-features = false, features = ["dlss-release-runtime"] }
nvidia-nrd = { version = "0.1.1", default-features = false, features = ["native"] }
nvidia-streamline = { version = "0.1.0", default-features = false }

Omit default-features = false to use the default vk-graph adapters.

For the CPU baker, use nvidia-omm = { version = "0.1.0", features = ["native"] }. For SDK acquisition alone, use nvidia-sdk = "0.1.0".

Raw Vulkan APIs

Integration Entry Points
DLSS VulkanInitInfo, Ngx::initialize_raw, Ngx::device_extensions_raw
NRD Nrd::from_raw
Streamline on Windows Streamline::create_proxy_ash_instance, returning ProxyInstanceOwner

The Streamline entry point creates an instance through its interposer. It does not attach Streamline to arbitrary externally created devices.

Warning

Raw Vulkan APIs are unsafe. Callers must uphold the documented handle lifetimes and GPU-safe shutdown order.

Graph adapters also require unsafe calls where ownership cannot prove device provenance, enabled extensions, queue configuration, or creation-pointer validity.

The default graph adapters retain their device and instance ownership behavior.

Feature Selection

Renderer features do not control native SDK support or acquisition.

Configuration Behavior
NRD without default features Enable native to retain the native backend.
DLSS without dlss-release-runtime Uses the development runtime.
Unsupported native platform Uses a stub regardless of renderer features.

Contributions for additional renderer adapters are welcome. Keep adapters optional and the core APIs independent of any particular renderer.

Additional graphics-API backends are also welcome as implemented and tested changes. The current Vulkan bindings do not imply support for those APIs.

SDK Resolution

Resolution uses the first available source:

  1. The SDK-specific variable: DLSS_SDK, NRD_SDK, OMM_SDK, SHARC_SDK, or STREAMLINE_SDK.
  2. NVIDIA_SDK_ROOT/<sdk>/<version>.
  3. The verified user cache.
  4. A pinned official download.
Setting Effect
NVIDIA_SDK_CACHE Overrides the cache directory.
NVIDIA_SDK_OFFLINE=1 Prohibits SDK downloads.
Cargo offline mode Also prohibits SDK downloads.

Explicitly configured SDK directories are never replaced or modified.

Important

Downloading or using an SDK may accept additional NVIDIA terms. Review the URL and license reported by the resolver before enabling native integrations.

License

Project-authored Rust and native bridge code is dual-licensed. Choose either:

NVIDIA SDKs and other downloaded third-party components retain their own licenses.

About

Rust bindings and APIs for NVIDIA rendering SDKs: DLSS/NGX, NRD, SHARC, OMM, and Streamline

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages