ebitengine/purego
View on GitHub ↗ ★ 4,080 Assembly
A library for calling C functions from Go without Cgo
16 mentions on Hacker News by 12 people: 3 stories, 13 comments · first 2023-02-12 · latest 2026-07-07
20082026
-
▲ 1
purego: A library for calling C functions from Go without Cgostory by eatonphil · 2026-07-07 · 0 comments
-
…in Go. Most of the time I have found calling C from Go faster or on par with calling C from Python. https://github.com/ebitengine/purego
comment by impulser_ · 2026-05-08 · in Just Use Go -
If you want to avoid Cgo, you can use https://github.com/ebitengine/purego or Goffi to call the native functions. It's a bit cursed, but works.
comment by cyberax · 2026-01-08 · in Tailscale state file encryption no longer enabled by default -
…or less the same issues as CGo [4]. [1]: https://www.erlang.org/doc/system/nif.html [2]: https://pkg.go.dev/github.com/ebitengine/purego [3]: https://erlang.org/documentation/doc-10.1/doc/efficiency_gui... [4]:…
comment by kbolino · 2025-12-16 · in Full Unicode Search at 50× ICU Speed with AVX‑512 -
…tried lots of things in the past but not using Alpine which is a great idea Another alternative is https://github.com/ebitengine/purego You can use this to dynamic load shared objects / DLLs so in the OP example they could disable systemd…
comment by nickcw · 2025-12-13 · in Go is portable, until it isn't -
Cgo is terrible, but if you just want some simple C calls from a library, you can use https://github.com/ebitengine/purego to generate the bindings. It is a bit cursed, but works pretty well. I'm using it in my hardware-backed KMIP server…
comment by cyberax · 2025-12-13 · in Go is portable, until it isn't -
…not sure how many other people have gotten the memo (HostLayout didn't exist before Go 1.23). [1]: https://github.com/ebitengine/purego/issues/259
comment by kbolino · 2025-04-01 · in Go Optimization Guide -
▲ 2
Purego: A library for calling C functions from Go without Cgostory by johnmaguire · 2025-03-31 · 0 comments
-
…call into C, and the same performance is expected. I'm not the one saying this, read the authors: https://github.com/ebitengine/purego/issues/202 wazero uses a different mechanism, the one used to call Go assembly, but adds its own…
comment by ncruces · 2025-02-27 · in Calling Rust from Cursed Go -
It’s using purego: https://github.com/ebitengine/purego And linking against libtcl and libtk.
comment by cle · 2024-11-28 · in Tk9.0: CGo-free, cross platform GUI toolkit for Go -
…Go but also C. I mean, even on platforms without cgo, it's it working magically? No; it's using https://github.com/ebitengine/purego , which is: > A library for calling C functions from Go without Cgo. Like... I mean.... okaaaay, it's not…
comment by wokwokwok · 2024-08-13 · in Go is my hammer, and everything is a nail -
…you commonly need to cgo into ld.so to use dynamic linking. But there's this if you wanna try: https://github.com/ebitengine/purego
comment by ncruces · 2023-10-06 · in Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go -
…we discuss DNS and LDAP, nsswitch here: A library for calling C functions from Go without Cgo. https://github.com/ebitengine/purego https://news.ycombinator.com/item?id=34763681
comment by weitzj · 2023-04-08 · in Go 1.21 will (likely) have a static toolchain on Linux -
…my use cases those approaches worked perfectly, CGO free. [1] https://github.com/Binject/debug [2] https://github.com/ebitengine/purego
comment by cookiengineer · 2023-03-23 · in The simplicity of single-file Golang deployments -
…do in the identifiers? Are they just "name mangling" to keep them from being exported or something? https://github.com/ebitengine/purego/blob/v0.2.0-alpha/sys_d... I noticed another 0xB7 character in a comment, and sure enough it seems to…
comment by mdaniel · 2023-02-12 · in Purego – A library for calling C functions from Go without Cgo -
▲ 268
Purego – A library for calling C functions from Go without Cgostory by weitzj · 2023-02-12 · 69 comments