nothings/stb
View on GitHub ↗ ★ 34,927 C
stb single-file public domain libraries for C/C++
111 mentions on Hacker News by 78 people: 22 stories, 89 comments · first 2014-09-21 · latest 2026-08-10
20082026
-
Out of my personal go-to c++ libs, the only ones I missed are the stb libraries ( https://github.com/nothings/stb/ , in particular the image ones are very popular) and maybe ImGui, but that might be too niche. Also I would love to have a…
comment by s9w · 2020-01-30 · in Awesome Modern C++ -
https://github.com/nothings/stb/blob/master/stretchy_buffer.... Although I get you want an official standard library version, or a built in language feature.
comment by Impossible · 2019-12-26 · in I love coding in C -
…It's actually a pretty clever trick, and it effectively behaves as a .h / .c pair of files. See https://github.com/nothings/stb/blob/master/docs/stb_howto.t...
comment by cellularmitosis · 2019-12-13 · in Httpserver.h: Single header library for writing non-blocking HTTP servers in C -
…file headers for graphics tasks, like loading images, resizing images, rendering font glyphs, etc: https://github.com/nothings/stb
comment by planteen · 2019-10-28 · in SQLite is easy to compile -
…https://ourmachinery.com/post/physical-design/ Simple libs widely used in game dev circles: https://github.com/nothings/stb This one is a full game engine with tools made for educational purpose: https://www.raylib.com/ I do write games…
comment by stephc_int13 · 2019-09-21 · in Why I Write Games in C (yes, C) -
stb_image is widely used in games https://github.com/nothings/stb/blob/master/stb_image.h
comment by bbmario · 2019-08-21 · in Libspng – C library for reading and writing PNG files -
How does this compare to something like https://github.com/nothings/stb/blob/master/stb_image.h ? Is it just that it has more features and can handle weird edge cases?
comment by anaphor · 2019-08-21 · in Libspng – C library for reading and writing PNG files -
Here's a rationale for this from an author of very popular many single-header libraries: https://github.com/nothings/stb#why-single-file-headers As to how to use from two separate translation units - you need to define…
comment by mmozeiko · 2019-08-08 · in MPEG1 Single file C library -
…for "bytes" if you want channel resolution, or leaving integers if you have 32bit pixel depth. https://github.com/nothings/stb/blob/master/stb_image.h#L120 https://wiki.libsdl.org/SDL_Surface
comment by rootlocus · 2019-06-24 · in Fast key-value stores: An idea whose time has come and gone -
I'm thinking of examples like this: https://github.com/nothings/stb/blob/master/stb_image.h It's a complete image loader library in a single header. This header contains everything I need to use that library: the entire documentation, the…
comment by flohofwoe · 2019-05-27 · in Syntax highlighters are wrong (2014) -
https://github.com/nothings/stb is another set of good header only libraries. (I'm not the author and don't know them, I'm just a happy user.)
comment by bla3 · 2019-03-10 · in Single-file cross-platform C/C++ headers implementing self-contained libraries -
…ttps://github.com/NotCamelCase/RasterizationInOneWeekend 4: http://www.scratchapixel.com/index.php 5: https://github.com/nothings/stb/blob/master/stb_truetype.h 6: https://beej.us/guide/bgnet/ 7: https://github.com/search?q=http+parser&ref=…
comment by emmanueloga_ · 2018-12-12 · in Let’s build a browser engine (2014) -
…advantages as unity-builds (merging all sources into one file). PS: origin of the name "stb-style": https://github.com/nothings/stb (although I guess the general idea existed before)
comment by flohofwoe · 2018-10-20 · in Mio – Cross-platform header-only C++11 library for memory-mapped file IO -
…so you can have generic containers in C. For hash's, you can also look at klib's khash [5] [1] https://github.com/nothings/stb [2] https://github.com/attractivechaos/klib [3] https://github.com/nothings/stb/blob/master/stretchy_buffer....…
comment by dottrap · 2018-06-03 · in One year of C -
Sean Barrett (who I think popularized the idea) has a FAQ on this ( https://github.com/nothings/stb ) where he justifies it by pointing at difficulties with deploying libraries on Windows. Which is a fair point, but by going straight to…
comment by svdree · 2018-02-10 · in Nuklear: A single-header ANSI C GUI library -
If you need a minimalist open-source font rendering library, look at stb_truetype: https://github.com/nothings/stb A single header file. Unfortunately it cannot do what harfbuzz or pango do, that is lay out complex scripts or do any layout
comment by atesti · 2017-10-30 · in Firefox takes a bite out of the canvas ‘super cookie’ -
…are the stb header-only libraries. There is a hash table implementation buried inside stb.h [4] https://github.com/nothings/stb
comment by dottrap · 2017-08-23 · in Write a hash table in C -
…WebAssembly. There is a growing trend of header-only libraries, especially the popular stb: https://github.com/nothings/stb#stb_libs and there is a growing list here: https://github.com/nothings/single_file_libs I consult to find tiny…
comment by satoshinm · 2017-06-02 · in WebAssembly: Mozilla Won -
these come to mind: https://github.com/nothings/stb https://github.com/nothings/single_file_libs
comment by iammyIP · 2017-02-06 · in Learn C Programming with Open-Source Books -
…for redistributing libraries, but I've also found it useful to create these in my own projects. [0] https://github.com/nothings/stb
comment by saticmotion · 2016-12-23 · in Building and Linking Libraries in C -
…another set of similar libraries called the STB Libraries, primarily aimed at gamedev/graphicsdev: https://github.com/nothings/stb
comment by cobalt · 2016-12-17 · in Single-file C/C++ public-domain/open source libraries with minimal dependencies -
You can get good subpixel rendering from a single bitmap using a larger prefiltered glyph: https://github.com/nothings/stb/tree/master/tests/oversample
comment by panic · 2016-08-03 · in Inside font-rs, a font renderer written in Rust -
…is a link to it on the wiki page. The change that I am most fond of is making it an stb-style ( https://github.com/nothings/stb/ ) header library.
comment by networked · 2016-07-03 · in The Tcl War (1994) -
> stb_image.h For the record, this library is a single file with 6,755 (!) lines of code [1] [1] https://github.com/nothings/stb/blob/master/stb_image.h
comment by n00b101 · 2016-05-24 · in Lessons learned about how to make a header-file library (2013) -
…libs is probably the famous stb package [2]. - [1] https://bitbucket.org/rmitton/tigr/src - [2] https://github.com/nothings/stb
comment by dmytroi · 2016-05-05 · in OS X app in plain C -
…They are small self-contained decoders for many common media formats, with excellent documentation: https://github.com/nothings/stb/blob/master/stb_image.h https://github.com/nothings/stb/blob/master/stb_truetype.h…
comment by hthh · 2016-05-01 · in Ask HN: What are examples of GitHub repositories with high code quality? -
Sean Barrett (of stb headers fame) has written about the reasons for header-only libraries here: https://github.com/nothings/stb/blob/master/docs/stb_howto.t... If compile-time is a concern (it isn't in my experience, at least if the rest…
comment by flohofwoe · 2016-04-19 · in Nuklear: A small ANSI C GUI toolkit -
Yes! https://github.com/nothings/stb#why-single-file-headers
comment by mmozeiko · 2016-04-19 · in Nuklear: A small ANSI C GUI toolkit -
…that comes to my head: For common utilities for game development stb libraries are fantastic: https://github.com/nothings/stb For general idea how to structure code you could google "data oriented design c++". Try not to structure your…
comment by fsloth · 2016-02-01 · in Why I'm Choosing C++ -
…can handle (similar to sqlite)? Because writing trivial scripts on Windows is also a pain? [1] https://github.com/nothings/stb [2] https://github.com/nothings/stb/blob/master/stb_c_lexer.h
comment by chubot · 2016-01-23 · in Single-file public-domain/open source C libraries with minimal dependencies -
There is also STB stretchy buffer, popular with game devs. https://github.com/nothings/stb/blob/master/stretchy_buffer....
comment by dottrap · 2016-01-09 · in Why I Write Games in C -
…not be to all tastes, but there you go. (Here's another option, that's more like the link here: https://github.com/nothings/stb/blob/master/stretchy_buffer.... - note note about strict aliasing, which I imagine could apply to the list…
comment by to3m · 2015-11-30 · in Implementing a sort of generic, sort of type-safe array in C -
…are after small code, you can take zlib decode functionality from stb_image.h code (public domain): https://github.com/nothings/stb/blob/master/stb_image.h#L345...
comment by mmozeiko · 2015-10-26 · in Show HN: Mini_gzip – embeddable, minimal, in-memory Gzip API -
…You don't need to zip or tar the files up, you don't have to remember to attach two files, etc. https://github.com/nothings/stb/
comment by lookbothways · 2015-08-18 · in Atria: A toolkit for modern C++ development from Ableton -
…://github.com/ValveSoftware/vogl/tree/master/src/voglco... And of course already mentioned stb_image: https://github.com/nothings/stb/blob/master/stb_image.h
comment by mmozeiko · 2014-11-13 · in LodePNG: All-in-one PNG image decoder and encoder for C and C++ -
I'm reminded of stb_image... https://github.com/nothings/stb/blob/master/stb_image.h
comment by akx · 2014-11-13 · in LodePNG: All-in-one PNG image decoder and encoder for C and C++ -
…(i'd call them libraries, but almost all are written to be used as a single-header file include): https://github.com/nothings/stb
comment by binarycrusader · 2014-09-28 · in Opus beats all other lossy audio codecs. Again -
…asset loading: http://assimp.sourceforge.net/index.html - the STB headers (not OpenGL specific): https://github.com/nothings/stb - GLFW as window system glue and input wrapper - ...and more which I am not aware of or forgot to list GPU…
comment by flohofwoe · 2014-09-21 · in OpenGL in 2014