GeistHaus
log in · sign up

cgo

pkg.go.dev

Cgo enables the creation of Go packages that call C code.

26 pages link to this URL
All Go: Building and Testing

In this, my fifth article on the Go programming language, I’m looking at the build and packaging process, and other tooling. I’ll start by looking at how code is structured into packages, and then look at the tools for building, packaging and testing.

0 inbound links article en Software Andy Pearceblogsoftwarepythongopackagingcompilationtesting
CGO Performance In Go 1.21

Tl;Dr Cgo calls take about 40ns, about the same time encoding/json takes to parse a single digit integer. On my 20 core machine Cgo call performance scales with core count up to about 16 cores, after which some known contention issues slow things down. Disclaimer While alot of this article argues that “Cgo performance is good actually”, please don’t take that to mean “Cgo is good actually”. I’ve maintained production applications that use Cgo and non-trivial bindings to lua.

3 inbound links article en
Offensive CGO - An ELF Loader

TL;DR emp3r0r is a C2 framework written in pure Go. For many years, I have been building it without CGO because of annoying dependencies (glibc) that prevent the agent from running on some systems, that also ruled out the possibility of using CGO to compile agent in DLL or …

1 inbound link article en Tools golangelfloadercgoredteamlinux CC BY-NC 4.0
you are in a box

your data is trapped inside the box that is your program. you can only see what the program author exposes.

Stop Saying C/C++

For as long as I can remember, I have heard people say C/C++ when referring to a project written in C and or C++. A lot of programming/developer jobs also refer to C/C++ when they need a programmer who knows either C or C++. To most people who have never touched C or C++ this might not seem like a big deal. However, the problem is that when people say this term (C/C++) they make it seem like C and C++ are similar or closely related programming languages. That is not true. Although C++ was based off of C when it was first created, these two languages have slowly drifted apart over the years to the point where they share less and less in common1.

1 inbound link en websiteminimalsimplehtmlweb CC BY-SA 4.0
Lies we tell ourselves to keep using Golang

In the two years since I’ve posted I want off Mr Golang’s Wild Ride, it’s made the rounds time and time again, on Reddit, on Lobste.rs, on HackerNews, and elsewhere. And every time, it elicits the ...

1 inbound link article en
jrouter

**WIP** Home-grown alternative implementation of Apple Internet Router 3.0

7 inbound links object en gitforgeforgejo