Code Monkey home page Code Monkey logo

rust-stb-image's Introduction

rust-stb-image's People

Contributors

blevin avatar bors-servo avatar brendanzab avatar brson avatar darkspirit avatar emoon avatar frewsxcv avatar glennw avatar gw3583 avatar hannobraun avatar jasper-bekkers avatar jdm avatar johshoff avatar kmcallister avatar kvark avatar larsbergstrom avatar manishearth avatar marijns95 avatar mbrubeck avatar metajack avatar mmatyas avatar mmeyerho avatar mrobinson avatar ms2ger avatar obiwanus avatar ozkriff avatar pcwalton avatar sebcrozet avatar simonsapin avatar yichoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-stb-image's Issues

Publish a new release

#105 is in for some time and we depend on it, but would like to switch to a crates.io release. Can the latest branch be published as 0.3.0?

Thanks!

Document alternatives

Pursuant to these remarks:

As a maintainer, I would prefer to keep this repo writeable for now so we can apply updates and fixes to benefit the few people still using this library. However, I do think that we should do what we can to encourage most people not to use this library. Perhaps that should include a RustSec advisory so tools like cargo-audit will complain. Documentation pointing to alternatives is definitely a good idea.

One obvious alternative is the image crate but it may have lackluster performance by comparison on a few metrics. That should probably be fixed, but that's an issue for that crate. Are there any other reasonable-to-high-quality alternatives?

Archive this repo?

This code isn't really heavily maintained, it's volatile and liable to be unsound (see #103 for instance), is there a reason to not just archive this repo and have done with it?

Link-time error on Windows

I seem to be able to compile stb_image.c just fine (e.g: cargo build works), but when I try to link it to another program, or run cargo test, I get an error from the linker.

Setup

OS: Windows 8.1
ENV: MSYS2-20150512/MinGW-x86_64

gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-msys/4.9.2/lto-wrapper.exe
Target: x86_64-pc-msys
Configured with: /build2/gcc/src/gcc-4.9.2/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-arch=x86-64 --disable-multilib --with-tune=generic --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lto --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --disable-win32-registry --disable-symvers --with-gnu-ld --with-gnu-as --disable-isl-version-check --enable-checking=release --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
Thread model: posix
gcc version 4.9.2 (GCC)
rustc -V

rustc 1.2.0-nightly (b77d60adb 2015-05-29) (built 2015-05-30)

The error I'm seeing is undefined references to __assert_func:

$ cargo test
   Compiling stb_image v0.1.0 (file:///C:/Users/drbawb/senketsu-sandbox/rust-stb-image)
error: linking with `gcc` failed: exit code: 1
note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-static-libgcc" "-m64" "-L" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\stb_image-5a494723a7fe8dad.o" "-o" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\stb_image-5a494723a7fe8dad.exe" "-Wl,--gc-sections" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\deps\liblibc-2eda841eb12a3090.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libtest-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libgetopts-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libserialize-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libterm-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\liblog-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libstd-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libcollections-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\librustc_unicode-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\librand-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\liballoc-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\liblibc-11582ce5.rlib" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib\libcore-11582ce5.rlib" "-L" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug" "-L" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\deps" "-L" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out" "-L" "C:\Program Files\Rust nightly 1.2\bin\rustlib\x86_64-pc-windows-gnu\lib" "-L" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\.rust\bin\x86_64-pc-windows-gnu" "-L" "C:\Users\drbawb\senketsu-sandbox\rust-stb-image\bin\x86_64-pc-windows-gnu" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "stb-image" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-l" "kernel32" "-l" "ws2_32" "-l" "userenv" "-l" "advapi32" "-l" "compiler-rt"
note: C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0xef9): undefined reference to `__assert_func'
C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0x13cb): undefined reference to `__assert_func'
C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0x1d08): undefined reference to `__assert_func'
C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0x54fa): undefined reference to `__assert_func'
C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0x55f8): undefined reference to `__assert_func'
C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o):stb_image.c:(.text+0x5891): more undefined references to `__assert_func' follow
ld: C:\Users\drbawb\senketsu-sandbox\rust-stb-image\target\debug\build\stb_image-d0b38b90eb5da802\out\libstb-image.a(stb_image.o): bad reloc address 0x0 in section `.data'

Just wondering if there's anything glaringly wrong with my setup; or if anyone has seen similar errors when building on Windows?

Problem when compiling for target wasm32-unknown-unknown

This is somewhat connected to #91

When trying to compile for the wasm32 target (without emscripten) but with cargo web build, I get some errors due to the libc dependency.

i.e.:

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:47:34
   |
47 |                          x: *mut c_int,
   |                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:48:34
   |
48 |                          y: *mut c_int,
   |                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:49:37
   |
49 |                          comp: *mut c_int,
   |                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:50:36
   |
50 |                          req_comp: c_int)
   |                                    ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `FILE` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:53:44
   |
53 |         pub fn stbi_load_from_file(f: *mut FILE,
   |                                            ^^^^ not found in this scope
error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:54:44
   |
54 |                                    x: *mut c_int,
   |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:55:44
   |
55 |                                    y: *mut c_int,
   |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:56:47
   |
56 |                                    comp: *mut c_int,
   |                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:57:46
   |
57 |                                    req_comp: c_int)
   |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_void` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:61:52
   |
61 |                                         user: *mut c_void,
   |                                                    ^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
   |
25 |     use std::ffi::c_void;
   |
25 |     use std::os::raw::c_void;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:62:49
   |
62 |                                         x: *mut c_int,
   |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:63:49
   |
63 |                                         y: *mut c_int,
   |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:64:52
   |
64 |                                         comp: *mut c_int,
   |                                                    ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:65:51
   |
65 |                                         req_comp: c_int)
   |                                                   ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:69:44
   |
69 |                                       len: c_int,
   |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:70:47
   |
70 |                                       x: *mut c_int,
   |                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:71:47
   |
71 |                                       y: *mut c_int,
   |                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:72:50
   |
72 |                                       comp: *mut c_int,
   |                                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:73:49
   |
73 |                                       req_comp: c_int)
   |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_float` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:74:47
   |
74 |                                       -> *mut c_float;
   |                                               ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_float;
   |

error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error[E0412]: cannot find type `c_char` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:76:44
   |
76 |         pub fn stbi_loadf(filename: *const c_char,
   |                                            ^^^^^^
help: a primitive type with a similar name exists
   |
76 |         pub fn stbi_loadf(filename: *const char,
   |                                            ^^^^
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_char;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:77:35
   |
77 |                           x: *mut c_int,
   |                                   ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:78:35
   |
78 |                           y: *mut c_int,
   |                                   ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:79:38
   |
79 |                           comp: *mut c_int,
   |                                      ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:80:37
   |
80 |                           req_comp: c_int)
   |                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_float` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:81:35
   |
81 |                           -> *mut c_float;
   |                                   ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_float;
   |

error[E0412]: cannot find type `FILE` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:83:45
   |
83 |         pub fn stbi_loadf_from_file(f: *mut FILE,
   |                                             ^^^^ not found in this scope
error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:84:45
   |
84 |                                     x: *mut c_int,
   |                                             ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:85:45
   |
85 |                                     y: *mut c_int,
   |                                             ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:86:48
   |
86 |                                     comp: *mut c_int,
   |                                                ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:87:47
   |
87 |                                     req_comp: c_int)
   |                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error: Could not compile `walkdir`.
warning: build failed, waiting for other jobs to finish...
error[E0412]: cannot find type `c_float` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:88:45
   |
88 |                                     -> *mut c_float;
   |                                             ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_float;
   |

error[E0412]: cannot find type `c_void` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:91:53
   |
91 |                                          user: *mut c_void,
   |                                                     ^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
   |
25 |     use std::ffi::c_void;
   |
25 |     use std::os::raw::c_void;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:92:50
   |
92 |                                          x: *mut c_int,
   |                                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:93:50
   |
93 |                                          y: *mut c_int,
   |                                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:94:53
   |
94 |                                          comp: *mut c_int,
   |                                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_int` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:95:52
   |
95 |                                          req_comp: c_int)
   |                                                    ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_int;
   |

error[E0412]: cannot find type `c_float` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:96:50
   |
96 |                                          -> *mut c_float;
   |                                                  ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_float;
   |

error[E0412]: cannot find type `c_float` in this scope
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:98:45
   |
98 |         pub fn stbi_hdr_to_ldr_gamma(gamma: c_float);
   |                                             ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
   |
25 |     use std::os::raw::c_float;
   |

error[E0412]: cannot find type `c_float` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:100:45
    |
100 |         pub fn stbi_hdr_to_ldr_scale(scale: c_float);
    |                                             ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_float;
    |

error[E0412]: cannot find type `c_float` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:102:45
    |
102 |         pub fn stbi_ldr_to_hdr_gamma(gamma: c_float);
    |                                             ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_float;
    |

error[E0412]: cannot find type `c_float` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:104:45
    |
104 |         pub fn stbi_ldr_to_hdr_scale(scale: c_float);
    |                                             ^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_float;
    |

error[E0412]: cannot find type `c_void` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:107:54
    |
107 |                                           user: *mut c_void)
    |                                                      ^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
    |
25  |     use std::ffi::c_void;
    |
25  |     use std::os::raw::c_void;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:108:46
    |
108 |                                           -> c_int;
    |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:110:69
    |
110 |         pub fn stbi_is_hdr_from_memory(buffer: *const stbi_uc, len: c_int) -> c_int;
    |                                                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:110:79
    |
110 |         pub fn stbi_is_hdr_from_memory(buffer: *const stbi_uc, len: c_int) -> c_int;
    |                                                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:112:45
    |
112 |         pub fn stbi_is_hdr(filename: *const c_char) -> c_int;
    |                                             ^^^^^^
help: a primitive type with a similar name exists
    |
112 |         pub fn stbi_is_hdr(filename: *const char) -> c_int;
    |                                             ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:112:56
    |
112 |         pub fn stbi_is_hdr(filename: *const c_char) -> c_int;
    |                                                        ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `FILE` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:114:46
    |
114 |         pub fn stbi_is_hdr_from_file(f: *mut FILE) -> c_int;
    |                                              ^^^^ not found in this scope
error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:114:55
    |
114 |         pub fn stbi_is_hdr_from_file(f: *mut FILE) -> c_int;
    |                                                       ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:116:48
    |
116 |         pub fn stbi_failure_reason() -> *const c_char;
    |                                                ^^^^^^
help: a primitive type with a similar name exists
    |
116 |         pub fn stbi_failure_reason() -> *const char;
    |                                                ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_void` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:118:60
    |
118 |         pub fn stbi_image_free(retval_from_stbi_load: *mut c_void);
    |                                                            ^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
    |
25  |     use std::ffi::c_void;
    |
25  |     use std::os::raw::c_void;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:121:43
    |
121 |                                      len: c_int,
    |                                           ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:122:46
    |
122 |                                      x: *mut c_int,
    |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:123:46
    |
123 |                                      y: *mut c_int,
    |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:124:49
    |
124 |                                      comp: *mut c_int)
    |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:125:41
    |
125 |                                      -> c_int;
    |                                         ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_void` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:128:52
    |
128 |                                         user: *mut c_void,
    |                                                    ^^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
    |
25  |     use std::ffi::c_void;
    |
25  |     use std::os::raw::c_void;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:129:49
    |
129 |                                         x: *mut c_int,
    |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:130:49
    |
130 |                                         y: *mut c_int,
    |                                                 ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:131:52
    |
131 |                                         comp: *mut c_int)
    |                                                    ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:132:44
    |
132 |                                         -> c_int;
    |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:134:43
    |
134 |         pub fn stbi_info(filename: *const c_char,
    |                                           ^^^^^^
help: a primitive type with a similar name exists
    |
134 |         pub fn stbi_info(filename: *const char,
    |                                           ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:135:34
    |
135 |                          x: *mut c_int,
    |                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:136:34
    |
136 |                          y: *mut c_int,
    |                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:137:37
    |
137 |                          comp: *mut c_int)
    |                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:138:29
    |
138 |                          -> c_int;
    |                             ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `FILE` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:140:44
    |
140 |         pub fn stbi_info_from_file(f: *mut FILE,
    |                                            ^^^^ not found in this scope
error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:141:44
    |
141 |                                    x: *mut c_int,
    |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:142:44
    |
142 |                                    y: *mut c_int,
    |                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:143:47
    |
143 |                                    comp: *mut c_int)
    |                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:144:39
    |
144 |                                    -> c_int;
    |                                       ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:146:82
    |
146 |         pub fn stbi_set_unpremultiply_on_load(flag_true_if_should_unpremultiply: c_int);
    |                                                                                  ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:148:76
    |
148 |         pub fn stbi_convert_iphone_png_to_rgb(flag_true_if_should_convert: c_int);
    |                                                                            ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:150:65
    |
150 |         pub fn stbi_zlib_decode_malloc_guesssize(buffer: *const c_char,
    |                                                                 ^^^^^^
help: a primitive type with a similar name exists
    |
150 |         pub fn stbi_zlib_decode_malloc_guesssize(buffer: *const char,
    |                                                                 ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:151:55
    |
151 |                                                  len: c_int,
    |                                                       ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:152:64
    |
152 |                                                  initial_size: c_int,
    |                                                                ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:153:63
    |
153 |                                                  outlen: *mut c_int)
    |                                                               ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:154:58
    |
154 |                                                  -> *mut c_char;
    |                                                          ^^^^^^
help: a primitive type with a similar name exists
    |
154 |                                                  -> *mut char;
    |                                                          ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:156:55
    |
156 |         pub fn stbi_zlib_decode_malloc(buffer: *const c_char,
    |                                                       ^^^^^^
help: a primitive type with a similar name exists
    |
156 |         pub fn stbi_zlib_decode_malloc(buffer: *const char,
    |                                                       ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:157:45
    |
157 |                                        len: c_int,
    |                                             ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:158:53
    |
158 |                                        outlen: *mut c_int)
    |                                                     ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:159:48
    |
159 |                                        -> *mut c_char;
    |                                                ^^^^^^
help: a primitive type with a similar name exists
    |
159 |                                        -> *mut char;
    |                                                ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:161:56
    |
161 |         pub fn stbi_zlib_decode_buffer(obuffer: *const c_char,
    |                                                        ^^^^^^
help: a primitive type with a similar name exists
    |
161 |         pub fn stbi_zlib_decode_buffer(obuffer: *const char,
    |                                                        ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:162:46
    |
162 |                                        olen: c_int,
    |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:163:56
    |
163 |                                        ibuffer: *const c_char,
    |                                                        ^^^^^^
help: a primitive type with a similar name exists
    |
163 |                                        ibuffer: *const char,
    |                                                        ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:164:46
    |
164 |                                        ilen: c_int)
    |                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:165:43
    |
165 |                                        -> c_int;
    |                                           ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:167:64
    |
167 |         pub fn stbi_zlib_decode_noheader_malloc(buffer: *const c_char,
    |                                                                ^^^^^^
help: a primitive type with a similar name exists
    |
167 |         pub fn stbi_zlib_decode_noheader_malloc(buffer: *const char,
    |                                                                ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:168:54
    |
168 |                                                 len: c_int,
    |                                                      ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:169:62
    |
169 |                                                 outlen: *mut c_int)
    |                                                              ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:170:57
    |
170 |                                                 -> *mut c_char;
    |                                                         ^^^^^^
help: a primitive type with a similar name exists
    |
170 |                                                 -> *mut char;
    |                                                         ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:172:63
    |
172 |         pub fn stbi_zlib_decode_noheader_buffer(obuffer: *mut c_char,
    |                                                               ^^^^^^
help: a primitive type with a similar name exists
    |
172 |         pub fn stbi_zlib_decode_noheader_buffer(obuffer: *mut char,
    |                                                               ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:173:55
    |
173 |                                                 olen: c_int,
    |                                                       ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_char` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:174:65
    |
174 |                                                 ibuffer: *const c_char,
    |                                                                 ^^^^^^
help: a primitive type with a similar name exists
    |
174 |                                                 ibuffer: *const char,
    |                                                                 ^^^^
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_char;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:175:55
    |
175 |                                                 ilen: c_int)
    |                                                       ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

error[E0412]: cannot find type `c_int` in this scope
   --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/stb_image.rs:176:52
    |
176 |                                                 -> c_int;
    |                                                    ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
    |
25  |     use std::os::raw::c_int;
    |

Bump version number

Thanks for merging that pull request so quickly. Do you think we can bump the version number and re publish to crates.io? Right now I have to link against the git repo directly to get the latest changes.

Make rust-stb-image buildable with rustpkg

rust-stb-image currently uses configure && make based build system. I think rustpkg based one would be preferable. I'm not sure if rustpkg is ready yet to handle mixed c/rust projects, but hopefully this gets the ball rolling anyways.

Error when building for target wasm32-unknown-emscripten

If I try to build for wasm32-unknown-emscripten using the following command:

cargo build --target wasm32-unknown-emscripten

I get the following error:

   Compiling stb_image v0.2.2
error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:75:33
   |
75 |     if !convert_hdr && stbi_is_hdr(bytes)!=0   {
   |                                    ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:76:30
   |
76 |         let buffer = stbi_loadf(bytes,
   |                                 ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error[E0308]: mismatched types
  --> /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/stb_image-0.2.2/src/image.rs:87:29
   |
87 |         let buffer = stbi_load(bytes,
   |                                ^^^^^ expected u8, found i8
   |
   = note: expected type `*const u8`
              found type `*const i8`

error: aborting due to 3 previous errors

error: Could not compile `stb_image`.

Mitigate risk of losing vulnerability fix #102?

#102 fixes a vulnerability that has been named RUSTSEC-2023-0021 (rustsec/advisory-db#1647). The fix is made by directly changing a vendored C file.

This fix seems liable to get lost the next time the vendored C file is updated to a new upstream version, as it appears to have been the last time it was changed.

Would it be reasonable/cost-effective for Servo to take a step to mitigate this risk, such as

  • patching the C file at build-time instead (like how Linux distros patch upstream source code, e.g. nothings/stb#1454 (comment)), using a build script, which I see this crate already has,
  • or at least adding a warning in the comment at the top of the file saying that the file is no longer exactly the upstream version?

Investigate issuing a RUSTSEC advisory?

As mentioned in #109, the base C library that underlies this crate is quite deliberately... ah...not for using on untrusted input. The RUSTSEC or some other folks like the maintainers of tools like cargo vet, cargo deny, etc. may have some input on how to discourage people from picking up this crate casually just because it happens to have the stb_image name and they might be familiar with the C library.

Build fails "silently" on Windows 7 with Rust 1.0

Steps to reproduce using command line:

  1. git clone https://github.com/servo/rust-stb-image.git
  2. cd rust-stb-image
  3. cargo build

Which shows the output

Updating registry `https://github.com/rust-lang/crates.io-index`

Compiling stb_image v0.1.0 (file:///C:/Users/xxx/Downloads/tmp/rust-stb-ima
ge)
Compiling libc v0.1.7
failed to run custom build command for stb_image v0.1.0 (file:///C:/Users/xxx /Downloads/tmp/rust-stb-image)
Process didn't exit successfully: C:\Users\xxx\Downloads\tmp\rust-stb-image\t arget\debug\build\stb_image-61bec16120a6c64a\build-script-build (exit code: 101
)
--- stderr
thread '

' panicked at 'called Result::unwrap() on an Err value: Error
{ repr: Os(2) }', C:/bot/slave/stable-dist-rustc-win-64/build/src/libcore\result
.rs:729

Error when compiling for Android

When I compile a project that uses this crate I get an error while compiling the C source of this crate.

Here's the command I'm running, forcing the compiler to use as I'm trying to avoid having to build different Android toolchains based on the architecture:

CC=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc CXX=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ AR=/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar SYSROOT=/Users/tanis/android-ndk/platforms/android-24/arch-arm/ cargo build --no-default-features --target armv7-linux-androideabi --lib

The result is the following error:

   Compiling stb_image v0.2.2
   Compiling curl-sys v0.4.16
   Compiling sdl2 v0.30.0 (https://github.com/Rust-SDL2/rust-sdl2.git?branch=unsafe-textures-feature#59a95913)
error: failed to run custom build command for `stb_image v0.2.2`
process didn't exit successfully: `/Users/tanis/Documents/minigame-rust/target/debug/build/stb_image-c7925d9f7ee898d4/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("armv7-linux-androideabi")
OPT_LEVEL = Some("0")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
TARGET = Some("armv7-linux-androideabi")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
CC_armv7-linux-androideabi = None
CC_armv7_linux_androideabi = None
TARGET_CC = None
CC = Some("/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
CFLAGS_armv7-linux-androideabi = None
CFLAGS_armv7_linux_androideabi = None
TARGET_CFLAGS = None
CFLAGS = None
DEBUG = Some("true")
running: "/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-march=armv7-a" "-march=armv7-a" "-mfpu=vfpv3-d16" "-mfloat-abi=softfp" "-Wall" "-Wextra" "-o" "/Users/tanis/Documents/minigame-rust/target/armv7-linux-androideabi/debug/build/stb_image-9bbf328ed262afd5/out/src/stb_image.o" "-c" "src/stb_image.c"
cargo:warning=src/stb_image.c:390:19: fatal error: stdio.h: No such file or directory
cargo:warning= #include <stdio.h>
cargo:warning=                   ^
cargo:warning=compilation terminated.
exit code: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "/Users/tanis/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-march=armv7-a" "-march=armv7-a" "-mfpu=vfpv3-d16" "-mfloat-abi=softfp" "-Wall" "-Wextra" "-o" "/Users/tanis/Documents/minigame-rust/target/armv7-linux-androideabi/debug/build/stb_image-9bbf328ed262afd5/out/src/stb_image.o" "-c" "src/stb_image.c" with args "arm-linux-androideabi-gcc" did not execute successfully (status code exit code: 1).

', /Users/tanis/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.55/src/lib.rs:1672:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.