simvx.graphics._native.basis_transcoder_build¶
CFFI build script for the SimVX basis_universal UASTC transcoder.
Run once after install (or any time the vendored transcoder is updated):
uv run python -m simvx.graphics._native.basis_transcoder_build
Produces _simvx_basis_transcoder_<hash>.<abi>.so next to this file, where
<hash> is a short stable hash of the -DBASISD_SUPPORT_* define-set
(:data:MODULE_NAME). Changing the define-set changes the name, so a stale .so
is not reused. The runtime wrapper simvx.graphics._native.basis_transcoder
imports the current-hash module.
uv_build (the graphics build backend) doesn’t run C-extension build hooks
at install time, so this script is invoked manually or via the
simvx build-textures CLI subcommand (mirroring core’s simvx build-audio).
The vendored translation unit (vendor/basis_universal/transcoder/ basisu_transcoder.cpp) is C++, so the extension is compiled as a C++ TU
(source_extension=".cpp") and the transcoder .cpp is passed as a separate
sources entry so cffi compiles it to its own object and links it.
Module Contents¶
Functions¶
Data¶
API¶
- simvx.graphics._native.basis_transcoder_build.HERE¶
None
- simvx.graphics._native.basis_transcoder_build.GLUE_SOURCE¶
None
- simvx.graphics._native.basis_transcoder_build.VENDOR_ROOT¶
‘resolve(…)’
- simvx.graphics._native.basis_transcoder_build.VENDOR_INCLUDE¶
None
- simvx.graphics._native.basis_transcoder_build.TRANSCODER_CPP¶
None
- simvx.graphics._native.basis_transcoder_build.MODULE_NAME¶
None
- simvx.graphics._native.basis_transcoder_build.build(output_dir: str | None = None, *, verbose: bool = True) pathlib.Path¶
Compile the extension. Returns the path to the built .so/.dll.
- simvx.graphics._native.basis_transcoder_build.main() int¶