#texture #image #compress #intel #ispc


Rust bindings for Intel’s ISPC texture compressor

5 releases

✓ Uses Rust 2018 edition

0.1.4 Feb 1, 2019
0.1.3 Feb 1, 2019
0.1.2 Jan 12, 2019
0.1.1 Jan 12, 2019
0.1.0 Jan 12, 2019

#16 in Rendering engine

Download history 21/week @ 2019-01-08 13/week @ 2019-01-15 5/week @ 2019-01-22

14 downloads per month


1.5K SLoC



Latest version Documentation MIT APACHE2

Rust bindings for Intel's ISPC texture compressor.

State of the art texture compression for BC6H, BC7, ETC1, ASTC and BC1/BC3.


In the future, it may be possible to try and package ISPC with the crate (embedded, curl'd, etc..), but crates.io has a 10mb crate limit, so some thought is needed there. In addition to ISPC, the rust bindings to the generated code (provided by the ISPC crate) also needs rust bindgen, which requires libclang to be installed. This dependency is likely easier to break, if the ispc-rs crate is modified to support using a pre-generated FFI binding instead of always generating in build.rs.

For convenience, ISPC binaries for macOS, Linux, and Windows are in the repository (but not the crate). Additionally, libclang exists in the LLVM installer for Windows, also included. https://github.com/gwihlidal/intel-tex-rs/tree/master/dependencies

Supported compression formats:

  • BC1, BC3 (aka DXT1, DXT5)
  • BC6H (FP16 HDR input)
  • BC7
  • ETC1

Pending compression formats:

  • ASTC (LDR, block sizes up to 8x8)
    • Work in progress


Add this to your Cargo.toml:

intel_tex = "0.1.2"

and add this to your crate root:

extern crate intel_tex;


$ cargo run --release --example main

Width is 4096
Height is 4096
ColorType is RGB(8)
Converting RGB -> RGBA
Block count: 1048576
Compressing to BC7...
Saving lambertian.dds file


Licensed under either of

at your option.


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

Contributions are always welcome; please look at the issue tracker to see what known improvements are documented.

Code of Conduct

Contribution to the intel-tex crate is organized under the terms of the Contributor Covenant, the maintainer of intel-tex, @gwihlidal, promises to intervene to uphold that code of conduct.