5 unstable releases

0.3.2 Aug 8, 2020
0.3.1 Aug 2, 2020
0.3.0 Aug 2, 2020
0.2.0 Aug 2, 2020
0.1.0 Aug 1, 2020

#147 in FFI

Download history 25/week @ 2024-03-11 15/week @ 2024-03-18 18/week @ 2024-03-25 41/week @ 2024-04-01 9/week @ 2024-04-08 15/week @ 2024-04-15 17/week @ 2024-04-22 10/week @ 2024-04-29 7/week @ 2024-05-06 13/week @ 2024-05-13 14/week @ 2024-05-20 14/week @ 2024-05-27 14/week @ 2024-06-03 12/week @ 2024-06-10 10/week @ 2024-06-17 22/week @ 2024-06-24

60 downloads per month

MIT license

525KB
5K SLoC

C 4K SLoC // 0.2% comments Rust 1K SLoC // 0.0% comments

stb

Crate CI Docs Crates.io

All in one safe Rust API and wrappers for stb libraries.

The following APIs are currently available:

  • stb_easy_font
  • stb_dxt
  • stb_image
  • stb_image_write
  • stb_perlin

Please refer to the documentation for details or have a look on examples.

Not implemented, but planned:

  • stb_truetype
  • stb_image_resize
  • stb_rect_pack

Usage

Add the following to your Cargo.toml file:

[dependencies]
stb = "0.3.2"

or if you want to have a specific feature selection:

[dependencies]
stb = { version = "0.3.2", default-features = false, features = ["stb_easy_font"] }

Create features

Here is the list of feature toggles available in this crate so far:

  • stb_easy_font
  • stb_dxt
    • stb_dxt_use_rounding_bias
  • stb_image
    • stbi_no_linear
    • stbi_no_jpeg
    • stbi_no_png
    • stbi_no_bmp
    • stbi_no_psd
    • stbi_no_gif
    • stbi_no_hdr
    • stbi_no_pic
    • stbi_no_pnm
  • stb_image_write
  • stb_perlin

Contributing

Contributions are generally welcome. Make sure your changes make sense for this project (if in doubt, open an issue first), the code is reasonbly tested, and passes the CI checks.

Dependencies

~0–2MB
~38K SLoC