Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: add ability to run C function pointers in Go #17096
If you can work out how to do it safely, then, sure, I don't think anybody would object to adding this feature. I dropped the proposal label because I don't see this as something that needs to go through the proposal process. The problem here is not a concern about whether it is a good idea, but a concern as to whether it is possible at all. A call to a C function needs to change stacks and change the calling convention, so it's not simple.