Hacker GitHub

← All repos

floooh/sokol

View on GitHub ↗ ★ 10,403 C

minimal cross-platform standalone C headers

42 mentions on Hacker News by 18 people: 3 stories, 39 comments · first 2019-11-09 · latest 2026-10-27

Mentions per year 42 mentions · busiest year 2022 (9)
20082026
  1. …And (shameless plug): sokol-gfx tries to find a balance between simplicity and modern 3D APIs: https://github.com/floooh/sokol Demos with links to C source and shader code: WebGL2 backend: https://floooh.github.io/sokol-html5/ WebGPU…
    comment by flohofwoe · 2026-10-27 · in I still teach OpenGL ES 3.0
  2. …is more higher level both can be used. Otherwise learn opengl is a really good introduction. [0] https://github.com/floooh/sokol [1] https://wiki.libsdl.org/SDL3/CategoryGPU
  3. …abstraction (e.g. window system glue, 3D APIs or audio APIs) happens via the sokol headers though: https://github.com/floooh/sokol
  4. …is amazing. One of my favourite libraries ever is Sokol, which is used for those emulators AFAIR: https://github.com/floooh/sokol It hits the spot for me in terms of features, small-size and ease of use/embedding. Every other library has…
    comment by whstl · 2025-04-28 · in Tiny Emulators
  5. …rendering, audio, low level touch input) you can also check out the Sokol headers (shameless plug): https://github.com/floooh/sokol , or I guess SDL will work too (especially with the new GPU API in SDL3) - at least the sokol header…
  6. …maximize transition the window content doesn't scale), but the basic wobbling fix is fairly simple: https://github.com/floooh/sokol/pull/963 In general I have the impression that Kitty feels quite 'heavy' on macOS compared to both Wezterm…
    comment by flohofwoe · 2025-01-31 · in Release Notes for Ghostty 1.1.0
  7. Or Sokol: https://github.com/floooh/sokol
    comment by jops · 2024-12-08 · in Flappy Bird in 1000 lines of C
  8. …There is also bgfx ( https://github.com/bkaradzic/bgfx ), which is quite popular and sokol gfx ( https://github.com/floooh/sokol ) which I know of. Of course there are many more lesser known ones.
    comment by dxuh · 2024-08-30 · in SDL3 new GPU API merged
  9. …uses a library which abstracts away the differences between the system 3D APIs (shameless plug: https://github.com/floooh/sokol , but also BGFX, WebGPU or AFAIK SDL3 is also getting a cross-platform 3D API), or uses a complete game engine…
    comment by flohofwoe · 2024-06-06 · in Vulkan1.3 on the M1 in one month
  10. …Metal canvas in a window) in various non-Apple languages (currently C, C++, Zig, Rust, Odin, Nim): https://github.com/floooh/sokol ...I'm cheating though and use ObjC under the hood to talk to Cocoa and Metal ;)
    comment by flohofwoe · 2024-04-19 · in C-Macs – a pure C macOS application
  11. You might like https://github.com/floooh/sokol
  12. …https://floooh.github.io/sokol-html5/ Platform abstraction is handled through the sokol headers: https://github.com/floooh/sokol Dear ImGui is small and fast enough for running in browsers (it will add up to a few hundred KBytes of WASM…
  13. I wonder if using your library ( https://github.com/floooh/sokol ) instead of OpenGL will alleviate some of these issues for newcomers! There's already a sokol port of the learnopengl.com code ( https://github.com/GeertArien/learnopengl-exa…
    comment by cyber_kinetist · 2023-10-11 · in Vulkan Documentation
  14. If you're looking for something like this, Sokol is a much simpler alternative: https://github.com/floooh/sokol It doesn't support vulkan though, but if that's important to you you're probably much better off just using vulkan directly…
  15. …ticket links where users of my libraries stumbled over the issue (and with different symptoms): - https://github.com/floooh/sokol/issues/376 - https://github.com/floooh/sokol/issues/404 - https://github.com/floooh/cimgui-sokol-starterkit/is…
    comment by flohofwoe · 2023-07-02 · in Why glibc 2.34 removed libpthread
  16. My stuff for instance: https://github.com/floooh/sokol ...inspired by: https://github.com/nothings/stb (here's how the sokol headers are integrated into a Zig project, note that there is only a build.zig which builds everything:…
    comment by flohofwoe · 2023-06-30 · in File for divorce from LLVM
  17. …of embedded Javascript functions which can be called like C functions directly from the "C side": https://github.com/floooh/sokol/blob/4535a3b4be59eb912e77e04...
    comment by flohofwoe · 2023-05-03 · in I want to talk about WebGPU
  18. …support: https://wiki.libsdl.org/SDL2/README/emscripten My own cross-platform headers too: https://github.com/floooh/sokol ...there are also auto-generated Zig bindings btw ;) https://github.com/floooh/sokol-zig
    comment by flohofwoe · 2023-04-29 · in Learn WebGPU
  19. …- still it's good to have a "native fallback"): https://floooh.github.io/tiny8bit/ Also see: https://github.com/floooh/sokol and https://floooh.github.io/sokol-html5/index.html . (e.g. for me it's a way to easily get my C/C++…
  20. …those, plus the web, iOS and Android (granted I wrote my own set of wrapper libs to make this easy: https://github.com/floooh/sokol - but it's not like that's the only slim solution for cross-platform code).
  21. Interesting.. i personally use that a lot in C, this lib for example: https://github.com/floooh/sokol#sokol_gfxh I couldn't live without it https://dlang.org/spec/struct.html#static_struct_init D support it, what's blocking it?
  22. …can directly include C headers) or use the header to auto-generate the bindings. For example: - https://github.com/floooh/sokol-zig - https://github.com/floooh/sokol-nim - https://github.com/floooh/sokol-odin These are all auto-generated…
  23. …the Emscripten port of SDL, which otherwise seems to be the "default" when people do these things. https://github.com/floooh/sokol
    comment by vinkelhake · 2022-09-28 · in D3wasm 0.4 – Doom 3 in WASM
  24. …platform GPU libs, bgfx [1] or sokol [2] for example [1] - https://github.com/bkaradzic/bgfx [2] - https://github.com/floooh/sokol
    comment by Kukumber · 2022-09-23 · in The journey to Nintendo Switch
  25. …code to Sokol, lot's of really good decisions there and I love the minimal C -style structure: https://github.com/floooh/sokol
  26. …lot of fun to tinker around with this stuff in Zig :) [0] https://github.com/floooh/pacman.zig [1] https://github.com/floooh/sokol [2] https://github.com/floooh/sokol-zig [3] https://github.com/schellingb/wajic
    comment by flohofwoe · 2022-07-13 · in Zig and WASM
  27. …and not "great" as in "created by a big Silicon Valley company", but check out the sokol headers: https://github.com/floooh/sokol ...live samples: https://floooh.github.io/sokol-html5/index.html
    comment by flohofwoe · 2022-06-20 · in Notes on WebAssembly
  28. Quick shout-out to a graphics abstraction library that works quite well: sokol. https://github.com/floooh/sokol It has DX11, Metal, and OpenGL backends (with optional shader compilation tool from GLSL to each target), which is probably all…
    comment by cyber_kinetist · 2022-06-03 · in Deprecation of OpenGL and OpenCL (2018)
  29. Some other interesting libraries I've seen along these lines: - Sokol (sokol_gfx in particular): https://github.com/floooh/sokol - wgpu (see wgpu-native for the C API): https://github.com/gfx-rs/wgpu It kind of seems like graphics…
  30. …count just for the memory management of a single 3D backend which simply doesn't seem "right". See: https://github.com/floooh/sokol/blob/master/sokol_gfx.h
    comment by flohofwoe · 2021-07-21 · in Vulkan Memory Allocator
  31. …in the browser. It is an obstacle (at least a massive annoyance) for library authors (like this: https://github.com/floooh/sokol ). Those libraries can be used for extremely simple and small WASM snippets embedded in blog posts (like here:…
  32. …function from the C side as well as C functions from inside Javascript. E.g. JS embedded in C code: https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b... ...called from C: https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b73…
    comment by flohofwoe · 2021-03-04 · in Flutter 2
  33. …GLFW as intermediate layer, but this could also be SDL, or - shameless plug - the sokol headers ( https://github.com/floooh/sokol ), or (more commonly) a game engine like Unity, Unreal Engine, or your own code.
    comment by flohofwoe · 2021-02-22 · in Nuklear: A cross-platform GUI library in C
  34. …enable WASM apps in the "dozens of KBytes" range, and you get native-platform support "for free": https://github.com/floooh/sokol Check out these samples and have a look at the size in the browser devtools which are IMHO quite sensible:…
  35. …Apple and older hardware. We use Sokol, an amazing wrapper library, and it only supports the big 3. https://github.com/floooh/sokol
    comment by amedvednikov · 2020-12-22 · in V (Vlang) 0.2
  36. …out sokol_gfx.h (and maybe sokol_gl.h, which is a simple GL 1.x style API on top of sokol_gfx.h): https://github.com/floooh/sokol
    comment by flohofwoe · 2020-11-06 · in Ray Tracer Sandbox in Vulkan
  37. …also a header with a Dear ImGui rendering backend sitting on top of sokol_app.h and sokol_gfx.h): https://github.com/floooh/sokol ...and here's a minimal standalone starter project for writing Dear ImGui apps in C I just created a couple…
  38. …can be beautiful. Sokol exemplifies this.[1] [0] https://news.ycombinator.com/item?id=23800729 [1] https://github.com/floooh/sokol/blob/master/sokol_gfx.h
    comment by rl3 · 2020-08-15 · in Brain Oriented Programming
  39. …also created the excellent Sokol cross-platform graphics/sound library, which is being used here. https://github.com/floooh/sokol
    comment by rlp · 2019-11-09 · in Visual6502 Remix