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.1-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

diligent_drsn_packager-0.1.1-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.1-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.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a53dc89e812a23804bd449956f450aac68f2544dbfbf3d56cb538a77622c1ec1
MD5 f2fb64f72a1960331f785dffa62eb4c4
BLAKE2b-256 0dd7c695e54a570b7e8ceb425b7739e33042029871a116addd3c7d98b96a2f46

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.1-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.1-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 52015b1f77a351b8135ae3cdc505cc8114cce492de2495be9b4656b33374b39c
MD5 551934b15885185c7d6b2ef83ec8def2
BLAKE2b-256 b7d48f9c5606de8ccb85d4da5e289d36ec3a22318a8fc07851196146bb04e6de

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.1-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.1-py3-none-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for diligent_drsn_packager-0.1.1-py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 11027900bac90d3ff39a08cbb46494f14b68a5ff912c3091170d78b0f262e4fc
MD5 6b01c72545438372f202bff54420f981
BLAKE2b-256 59967a365ba1e08f6a4ba152335a7faa90e354e5413bdb783113f4d9be52461c

See more details on using hashes here.

Provenance

The following attestation bundles were made for diligent_drsn_packager-0.1.1-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