Re:Show HN: A new stdlib for Golang focusing on platform nat...
by maxmcd on Tuesday October 03, 2023 @10:56AM
(#37752804)
Can you expand more on the ffi piece? Using CGO has never been fun. Will this expose threads and allow for C interop that is easier to reason about? Can I dream of using this version of Go for all of my "wrap this C lib in a nicer Go experience" use-cases?
[ Parent
| on HN ]
Re:Show HN: A new stdlib for Golang focusing on platform nat...
by Leotard6963 on Tuesday October 03, 2023 @11:22AM
(#37753119)
Yes, that's one of our motivations to build this std!
The feature of generating go packages from C in `ffigen` still needs significant work to be done (mostly dealing with C calling conventions on different platforms), and the generated go package only works with dynamic libraries (as it uses the pragma `go:cgo_import_dynamic`).