Skip to main content

Prebuilt Diligent Engine RenderStatePackager CLI, distributed as a per-platform binary wheel

Project description

Diligent RenderStatePackager

License PyPI Build

Prebuilt Diligent Engine RenderStatePackager command-line tool, distributed as a per-platform Python binary wheel on PyPI. It compiles declarative render states (.drsn + HLSL) into a DeviceObjectArchive at build time, so an application can unpack pipeline states at runtime through IDearchiver instead of compiling shaders on startup.

The wheel ships only the native executable — install it and run the tool, with no need to build the packager (and all of DiligentCore + Dawn) from source.

Platform Wheel tag Serialized backends
Windows x64 win_amd64 Direct3D11, Direct3D12, Vulkan, WebGPU
macOS arm64 macosx_11_0_arm64 Vulkan, WebGPU
Linux x64 manylinux_2_28_x86_64 Vulkan, WebGPU

Installation

pip install diligent-drsn-packager
diligent-drsn-packager --help

The wheel is independent of the Python ABI (py3-none-<platform>) and works with any Python 3.8+.

Cloning the Repository

To build from source, clone with submodules:

git clone --recursive https://github.com/MikhailGorobets/Diligent-RenderStatePackager.git

If you cloned without --recursive, run git submodule update --init --recursive.

Repository Structure

Path Description
CMakeLists.txt Builds only the Diligent-RenderStatePackager executable
src/diligent_drsn_packager/ Python wrapper: get_executable_path() and a CLI passthrough
pyproject.toml, setup.py Packaging into a platform-tagged binary wheel
bootstrap.sh Init submodules, build, stage the binary
.github/workflows/ CI — build wheels (build.yml), publish to PyPI (publish.yml)
DiligentCore, DiligentTools Pinned submodules

Build and Run Instructions

Requires CMake 3.19+, Ninja and a C++20 toolchain. On Linux also install X11/xcb development headers (a configure-time dependency of DiligentTools' NativeApp): apt install libx11-dev libxcb1-dev or dnf install libX11-devel libxcb-devel.

./bootstrap.sh            # init submodules, build, stage the binary
python -m build --wheel   # produce dist/*.whl
pip install dist/*.whl

Usage from CMake

Resolve the executable from the installed wheel at configure time:

find_package(Python3 COMPONENTS Interpreter REQUIRED)
set(_pfx "${CMAKE_BINARY_DIR}/_drsn_packager")
execute_process(COMMAND "${Python3_EXECUTABLE}" -m pip install --target "${_pfx}"
                "diligent-drsn-packager==0.1.0")
execute_process(
    COMMAND "${Python3_EXECUTABLE}" -c
            "import sys;sys.path.insert(0,r'${_pfx}');import diligent_drsn_packager as p;print(p.get_executable_path())"
    OUTPUT_VARIABLE PACKAGER_EXE OUTPUT_STRIP_TRAILING_WHITESPACE)
# e.g. ${PACKAGER_EXE} -o RenderStates.bin --vulkan --webgpu -s Shaders -r RenderStates -i Lib.drsn

Version Compatibility

A DeviceObjectArchive is bound to DiligentCore's serialization format (header ArchiveVersion); an archive only loads in a runtime built from a compatible DiligentCore commit. The wheel records the commit it was built from in diligent_drsn_packager.__diligentcore_sha__. When the submodules are bumped, release a new wheel version and pin to it in the consumer.

Release

Set the version in pyproject.toml, then tag:

git tag v0.1.0 && git push --tags

publish.yml builds every platform wheel and uploads them to PyPI via Trusted Publishing (OIDC). Configure the PyPI project's trusted publisher (this repository, environment pypi) beforehand.

License

Apache-2.0 — see LICENSE. Bundled binaries are built from DiligentCore and DiligentTools, which are also licensed under Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

diligent_drsn_packager-0.1.0-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

diligent_drsn_packager-0.1.0-py3-none-manylinux_2_28_x86_64.whl (8.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

diligent_drsn_packager-0.1.0-py3-none-macosx_10_9_universal2.whl (4.9 MB view details)

Uploaded Python 3macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file diligent_drsn_packager-0.1.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 603294aadc6df75a287c14e872fcfbcf8397722de598cf33eb7279e9bb85c8e6
MD5 f1d236ad021dfffb080771feb711dcdb
BLAKE2b-256 029c0e118c66707f9447ff2a5eb83c2513fa986b1e9efc9eaad070cc4dfefee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.0-py3-none-win_amd64.whl:

Publisher: publish.yml on MikhailGorobets/Diligent-RenderStatePackager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diligent_drsn_packager-0.1.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 057c1ddc3434792315f3c88a4c9dc7256858d381d5709d10315eddd6507cb43c
MD5 77321216646e94b1dbfc474203e45639
BLAKE2b-256 a7e6864140a38fb30806e464c6514b1e59fbf0710e758b8de9b9c0ec2231f2cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on MikhailGorobets/Diligent-RenderStatePackager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diligent_drsn_packager-0.1.0-py3-none-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.0-py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4543123d767b77bcaaddb7246048a6b1b0cde76e6498f8ab43245d5a062d9170
MD5 ce10e3ac05487aaee6af78ff4d8a8a5f
BLAKE2b-256 addb69baab73477e4279f60dfde1fa7e820a941dd122d79ecd0ca7980a0acbc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.0-py3-none-macosx_10_9_universal2.whl:

Publisher: publish.yml on MikhailGorobets/Diligent-RenderStatePackager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page