MCPcopy Index your code
hub / github.com/aclysma/basis-universal-rs

github.com/aclysma/basis-universal-rs @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
158 symbols 300 edges 16 files 79 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

basis-universal-rs

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.

Status

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

Performance

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.

[profile.dev.package."basis-universal-sys"]
opt-level = 3

Enable optimizations for ALL upstream crates works too:

[profile.dev.package."*"]
opt-level = 3

License

The bindings are licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Contribution

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.

See LICENSE-APACHE and LICENSE-MIT.

Core symbols most depended-on inside this repo

into
called by 17
basis-universal/src/transcoding/enums.rs
init
called by 9
basis-universal/src/encoding/compressor.rs
transcode_image_level
called by 7
basis-universal/src/transcoding/transcoder.rs
source_image_mut
called by 6
basis-universal/src/encoding/compressor_params.rs
basis_file
called by 5
basis-universal/src/encoding/compressor.rs
set_print_status_to_stdout
called by 5
basis-universal/src/encoding/compressor_params.rs
set_uastc_quality_level
called by 5
basis-universal/src/encoding/compressor_params.rs
set_generate_mipmaps
called by 5
basis-universal/src/encoding/compressor_params.rs

Shape

Method 82
Function 43
Class 26
Enum 7

Languages

Rust100%

Modules by API surface

basis-universal/src/transcoding/transcoder.rs25 symbols
basis-universal/src/encoding/compressor_params.rs23 symbols
basis-universal-sys/src/encoding_bindings.rs20 symbols
basis-universal/src/transcoding/enums.rs19 symbols
basis-universal/src/encoding/compressor_image.rs17 symbols
basis-universal-sys/src/transcoding_bindings.rs14 symbols
basis-universal/src/encoding/compressor.rs13 symbols
basis-universal/src/transcoding/transcoding_tests.rs12 symbols
basis-universal/src/encoding/encoding_tests.rs6 symbols
basis-universal/examples/benchmark.rs3 symbols
basis-universal-sys/build.rs2 symbols
basis-universal/src/transcoding/mod.rs1 symbols

For agents

$ claude mcp add basis-universal-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page