#game #texture #gpu


Bindings for the basis-universal Supercompressed GPU Texture Codec by Binomial

8 releases

0.3.1 Nov 2, 2023
0.3.0 May 6, 2023
0.2.0 Feb 6, 2022
0.1.1 Mar 13, 2021
0.0.3 Feb 15, 2021

#185 in Game dev

Download history 660/week @ 2023-08-11 693/week @ 2023-08-18 968/week @ 2023-08-25 857/week @ 2023-09-01 936/week @ 2023-09-08 890/week @ 2023-09-15 671/week @ 2023-09-22 913/week @ 2023-09-29 1052/week @ 2023-10-06 1060/week @ 2023-10-13 1215/week @ 2023-10-20 914/week @ 2023-10-27 1076/week @ 2023-11-03 1154/week @ 2023-11-10 1295/week @ 2023-11-17 1034/week @ 2023-11-24

4,704 downloads per month
Used in 6 crates (2 directly)


101K SLoC

C++ 63K SLoC // 0.0% comments C 34K SLoC // 0.3% comments Rust 3K SLoC // 0.0% comments Visual Studio Project 424 SLoC Shell 322 SLoC // 0.1% comments Python 119 SLoC // 0.4% comments Visual Studio Solution 56 SLoC


Bindings for Binomial LLC's basis-universal Supercompressed GPU Texture Codec

basis-universal functionality can be grouped into two categories:

  • Encoding: Compresses and encode textures (optionally combining multiple images and mipmap layers in a single file/binary blob)
  • Transcoding: Unpacks the texture into GPU-friendly compression formats. The final format can be chosen based on what the available GPU hardware can support.

Encoding can be done ahead of time using a command line tool in the upstream repository.

The encoded data can either be stored as a file or a binary blob. This data can include multiple images, and each image can store multiple levels. This is commonly used for storing cube textures and textures with precomputed mipmaps. This library also supports generating mipmaps for you.

Please refer to https://github.com/BinomialLLC/basis_universal for more details.


These bindings should be production-ready. The API should remain fairly stable (assuming no major upstream changes in the wrapped basis-universal library)


The C++ code that is wrapped by these bindings is built at the same optimization level used for building the basis-universal-sys crate. Most users of these bindings will benefit from building this crate with optimizations enabled, even during development. To do that, place this in your Cargo.toml file.

opt-level = 3

Enable optimizations for ALL upstream crates works too:

opt-level = 3


The bindings are licensed under either of

at your option.

Upstream Dependencies

Some dependencies may be licensed under other terms. These licenses include "ISC", "CC0-1.0", "BSD-2-Clause", "BSD-3-Clause", and "Zlib". This is validated on a best-effort basis in every CI run using cargo-deny.

Binomial LLC's basis-universal Supercompressed GPU Texture Codec is licensed under Apache License 2.0:

Copyright (C) 2019-2020 Binomial LLC. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.