importc and stb

Guillaume Piolat first.last at
Thu Dec 16 16:04:34 UTC 2021

On Thursday, 16 December 2021 at 13:38:06 UTC, Adam D Ruppe wrote:
> On Thursday, 16 December 2021 at 10:38:38 UTC, stb wrote:
>> are we going to be able use 
>> with importc?
>> these are header only libraries and i use stb (and similar 
>> libraries) all the time.
>> there is no reason for me to use c/c++ for tools if importc 
>> can pull this off.
> note that some of these have already been ported to D like
> though i haven't updated it back from upstream for a while.
> but i think the import C should work with those if you can set 
> up the macros in a separate file ahead of time.

More STB translations:

  - `stb_image.h` v2.27
     => [D 
     I believe this is the fastest/resource efficient PNG loading 
available in D.
     That one is stripped for only PNG decoding only, it's useful 
if you want 16-bit PNG and the latest STB optimizations.

  - `stb_image_resize.h` v0.96:
     => [D 
     I believe this is the fastest/memory-aware image resizing 
available in D. It is an image resizer with an excellent quality.

  - `stb_truetype.h` v0.7:
    => [D 

  - `stb_vorbis.h` v1.22:
     => [D 

Most of the translations can't be used as-is in our codebase 
anyway, so they were all tweaked to fit their D purpose (eg: 
original might have ARM intrinsics).

More information about the Digitalmars-d mailing list