sokol-zig VS go

Compare sokol-zig vs go and see what are their differences.

sokol-zig

Zig bindings for the sokol headers (https://github.com/floooh/sokol) (by floooh)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
sokol-zig go
9 2,070
277 119,564
- 1.2%
9.0 10.0
5 days ago 5 days ago
C Go
- BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

sokol-zig

Posts with mentions or reviews of sokol-zig. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-01.
  • Zig cookbook: collection of simple Zig programs that demonstrate good practices
    6 projects | news.ycombinator.com | 1 Jan 2024
    Zig currently doesn't allow chained designators and also doesn't allow to partially initialize arrays and fill up the rest of the array with default values.

    E.g. the closest Zig equivalent to this C99 code:

    https://github.com/floooh/sokol-samples/blob/b3bc55c4411fa03...

    ...is this:

    https://github.com/floooh/sokol-zig/blob/a4b3c287fadd153a504...

    ...note how part of the initialization had to be moved out into "code".

    There's a ticket about this here, but it's currently not high-priority:

    https://github.com/ziglang/zig/issues/6068

  • Nim v2.0 Released
    49 projects | news.ycombinator.com | 1 Aug 2023
    I maintain auto-generated bindings for my C libraries for Zig and Nim (and Odin and Rust - although the Rust bindings definitely need some love to make them a lot more idiomatic).

    I think looking at the examples (which is essentially the same code in different languages) gives you a high level idea, but they only scratch the surface when it comes to language features (things like the Zig code not using comptime features):

    Zig: https://github.com/floooh/sokol-zig/tree/master/src/examples

    Nim: https://github.com/floooh/sokol-nim/tree/master/examples

    Odin: https://github.com/floooh/sokol-odin/tree/main/examples

    Rust: https://github.com/floooh/sokol-rust/tree/main/examples

  • Zig Build System
    8 projects | news.ycombinator.com | 14 Apr 2023
    IMHO you really need a programming language to describe a build, even when the result looks very declarative.

    E.g. not sure how Meson handles this, but when I have a project with dozens of similar build targets and platform specific compile options, I really want to do the build description in a loop instead of a data tree.

    (for example: https://github.com/floooh/sokol-zig/blob/3f978e58712f9eb029b...)

  • Zig and WASM
    11 projects | news.ycombinator.com | 13 Jul 2022
  • Mach v0.1 - cross-platform Zig graphics in ~60 seconds
    1 project | /r/Zig | 4 Apr 2022
    Is this project comparable to the zig sokol project?https://github.com/floooh/sokol-zig
  • How does zig magically cross compile without target shared libraries
    1 project | /r/Zig | 31 Mar 2022
    I was rather amazed that I could cross-compile the zig-sokol examples https://github.com/floooh/sokol-zig for a Windows target on a Linux host (WSL Ubuntu). I simply set -target x86_64-windows and copied the executable into Windows and got a nice spinning cube displayed.
  • Mach Engine: The Future of Graphics (With Zig)
    3 projects | news.ycombinator.com | 18 Oct 2021
    (disclaimer: shameless plug) Here's another cross-platform alternative, auto-generated Zig bindings to the Sokol headers:

    https://github.com/floooh/sokol-zig

    This is quite a bit slimmer than using one of the WebGPU libraries like wgpu-rs or Dawn, because sokol-gfx doesn't need an integrated shader cross-compiler (instead translation from a common shader source to the backend-specific shader formats happens offline).

    Eventually I'd also like to support the Android, iOS and WASM backends from Zig (currently this only works from C/C++, for instance here are the WASM demos: https://floooh.github.io/sokol-html5/)

  • Making Win32 APIs More Accessible to More Languages
    6 projects | news.ycombinator.com | 23 Jan 2021
    I'm tackling this issue from two sides:

    (1) Change the C-API to make it more "binding-generator-friendly", for instance by adding a range/slice-struct to th C-API which bundles a pointer and associated size, or specially named typedefs that only exist to give the binding generator hints for special case handling.

    (2) Make the bindings-generator configurable on a per-language and per-API basis, this can be as simple as a map which overrides type- and function-names, or injects manually written code into the generated bindings.

    The goal is to make the generated bindings more idiomatic to the target language.

    This mostly works if you have control over the underlying C-API of course, e.g. the language bindings are created by the original C-library project, not as an external project to convert a fixed C-API.

    I wrote a blog post about this whole topic:

    https://floooh.github.io/2020/08/23/sokol-bindgen.html

    ...and here's an example of one such semi-auto-generated Zig bindings, note the two "injected" helper functions at the top:

    https://github.com/floooh/sokol-zig/tree/master/src/sokol

    ...for instance note the "injected" helper functions here:

    https://github.com/floooh/sokol-zig/blob/1c93f60ad178869b84d...

  • Game Development
    4 projects | /r/Zig | 5 Jan 2021
    As you can see from the comments there are lots of options. Sokol is another one https://github.com/floooh/sokol-zig

go

Posts with mentions or reviews of go. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-28.
  • AWS Serverless Diversity: Multi-Language Strategies for Optimal Solutions
    4 projects | dev.to | 28 Apr 2024
    Now, I’m not going to use C++ again; I left that chapter years ago, and it’s not going to happen. C++ isn’t memory safe and easy to use and would require extended time for developers to adapt. Rust is the new kid on the block, but I’ve heard mixed opinions about its developer experience, and there aren’t many libraries around it yet. LLRD is too new for my taste, but **Go** caught my attention.
  • How to use Retrieval Augmented Generation (RAG) for Go applications
    3 projects | dev.to | 28 Apr 2024
    Generative AI development has been democratised, thanks to powerful Machine Learning models (specifically Large Language Models such as Claude, Meta's LLama 2, etc.) being exposed by managed platforms/services as API calls. This frees developers from the infrastructure concerns and lets them focus on the core business problems. This also means that developers are free to use the programming language best suited for their solution. Python has typically been the go-to language when it comes to AI/ML solutions, but there is more flexibility in this area. In this post you will see how to leverage the Go programming language to use Vector Databases and techniques such as Retrieval Augmented Generation (RAG) with langchaingo. If you are a Go developer who wants to how to build learn generative AI applications, you are in the right place!
  • From Homemade HTTP Router to New ServeMux
    4 projects | dev.to | 26 Apr 2024
    net/http: add methods and path variables to ServeMux patterns Discussion about ServeMux enhancements
  • Building a Playful File Locker with GoFr
    4 projects | dev.to | 19 Apr 2024
    Make sure you have Go installed https://go.dev/.
  • Fastest way to get IPv4 address from string
    1 project | news.ycombinator.com | 14 Apr 2024
  • We now have crypto/rand back ends that ~never fail
    1 project | news.ycombinator.com | 14 Apr 2024
  • Why Go is great choice for Software engineering.
    2 projects | dev.to | 7 Apr 2024
    The Go Programming Language
  • OpenBSD 7.5 Released
    5 projects | news.ycombinator.com | 5 Apr 2024
    When Go first shipped, it was already well-documented that the only stable ABI on some platforms was via dynamic libraries (such as libc) provided by said platforms. Go knowingly and deliberately ignored this on the assumption that they can get away with it. And then this happened:

    https://github.com/golang/go/issues/16606

    If that's not "getting burned", I don't know what is. "Trying to provide a nice feature" is an excuse, and it can be argued that it is a valid one, but nevertheless they knew that they were using an unstable ABI that could be pulled out from under them at any moment, and decided that it's worth the risk. I don't see what that has to do with "not being as broadly compatible as they had hoped", since it was all known well in advance.

  • Go's Error Handling Is Perfect
    2 projects | news.ycombinator.com | 5 Apr 2024
    Sadly, I think that is indeed radically different from Go’s design. Go lacks anything like sum types, and proposals to add them to the language have revealed deep issues that have stalled any development. See https://github.com/golang/go/issues/57644
  • Golang: out-of-box backpressure handling with gRPC, proven by a Grafana dashboard
    4 projects | dev.to | 3 Apr 2024
    I've been writing a lot about Go and gRPC lately:

What are some alternatives?

When comparing sokol-zig and go you can also consider the following projects:

zig-bgfx-sdl2 - Minimal zig project to get bgfx running with sdl2

v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io

bigger - bigg (bgfx + imgui + glfw + glm) + utils

TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.

sokol-samples - Sample code for https://github.com/floooh/sokol

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

JNA - Java Native Access

Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

ffmpeg - FFmpeg Zig package

Angular - Deliver web apps with confidence 🚀

liwords - A site that allows people to play a crossword board game against each other

golang-developer-roadmap - Roadmap to becoming a Go developer in 2020