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.<abi>.so next to this file. The runtime wrapper simvx.graphics._native.basis_transcoder imports it.

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

build

Compile the extension. Returns the path to the built .so/.dll.

main

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.build(output_dir: str | None = None, *, verbose: bool = True) pathlib.Path[source]

Compile the extension. Returns the path to the built .so/.dll.

simvx.graphics._native.basis_transcoder_build.main() int[source]