Tycho Softworks · @tychosoft
399 followers · 5746 posts · Server fosstodon.org

I do love for interfacing to non-go (C) library code and system features. Much nicer than and easy to wrap both C strings and structs, and doing so both ways. This made it simple to use ipc from apollo as well as to run the libeXosip2 stack under go.

#golang #cgo #jni #coventry

Last updated 1 year ago

Tycho Softworks · @tychosoft
375 followers · 5416 posts · Server fosstodon.org

I had been able to get an initial eXosip stack up on with and it is proving ideal for writing simpler clients and services quickly in .

#go #golang #cgo #sip

Last updated 1 year ago

Valentin Bersier · @beeb
80 followers · 499 posts · Server hachyderm.io

Finally, with simd (hw acceleration), using sha256-simd in go and sha2 in rust through cgo (static library) is roughly equivalent, rust is slightly worse because of the overhead of cgo.

#golang #rustlang #cgo

Last updated 1 year ago

Valentin Bersier · @beeb
79 followers · 494 posts · Server hachyderm.io

Fun experiment today with and where I checked if it would be faster to compute a large number of sha256 hashes directly in go or by using one of two ways: as a statically linked library with and as a separate process using unix-domain sockets for IPC. Turns out go is always faster, with my setup around 40%. I benchmarked pretty much all the crates I could find for it but go's "crypto/sha256" is damn fast.

#rustlang #golang #rust #cgo

Last updated 1 year ago

El Lamboz · @idiran
101 followers · 1873 posts · Server livellosegreto.it

Salve ragazzi, c'รจ qualcuno che lavora con e ? Ho scritto un package che si interfaccia con una DLL che ho scritto e vorrei sapere se nella distribuzione del package .go devo includere i file header, linker (il file .a per chi usa gcc) e il file .def della dll.

#golang #cgo

Last updated 1 year ago

Preslav Rachev · @preslavrachev
477 followers · 395 posts · Server mastodon.social

@vazub I generally don't have problems with projects, unless they have to do with . Though there has been a pure Go driver for quite a while, many packages still use the one, which is a sure-fire way to break all of my builds.

#golang #sqlite #cgo

Last updated 2 years ago

Preslav Rachev · @preslavrachev
410 followers · 257 posts · Server mastodon.social

is where the dream goes to die.

#cgo #golang

Last updated 2 years ago

Preslav Rachev · @preslavrachev
477 followers · 395 posts · Server mastodon.social

is where the dream goes to die.

#cgo #golang

Last updated 2 years ago

CVE · @cve
17 followers · 2208 posts · Server newsrelay.org

CVE-2020-28367 (go) - Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via malicious gcc flags specified via a directive.

web.nvd.nist.gov/view/vuln/det

#cgo #nist

Last updated 2 years ago

j.r · @jr
388 followers · 5583 posts · Server social.anoxinon.de

Hey |s,

I need your help:

I'm currently working on a project heavily involving cgo. Now I have a go function that gets a pointer and a length from a c lib. It needs to write byte data with the specific length into the c memory where the pointer points (yeah this is kind of a buffer you could say). How could I do this?

#gopher #golang #cgo

Last updated 4 years ago