2 ms·
Thanks! Do you mean for an already compiled Go binary? if you can recompile you can use cgo. If not the following requirements come to mind (there are more pr
by aviramha 4y ago
Thanks!
Do you mean for an already compiled Go binary? if you can recompile you can use cgo.
If not the following requirements come to mind (there are more probably):
1. Allocate g and m if doesn’t exist in current process.
2. Switch to go stack before call
Btw there’s the cgocallback routine that manages C code that calls into go so that’s a good look to see what’s needed.