New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make the gc public #32203
Comments
What are you going to do with the compiled code? You would still need a linker to make anything useful from the result. Do you want the linker also? Does it need to handle cgo? Then we'd need gcc bundled somehow as well. I'm not sure we want to do this. The interface for the compiler is complicated and it's not clear we want to freeze it, as we would need to do if we made it public in the stdlib. |
I'm sorry I don't 100% understand the internals of go. maybe I should replace all "compile" with "build". |
Have you considered just packaging go with your program? Or check if go is installed and is at least version x.y.z and if not, download and extract it? Why must it be compiled into your program? |
It doesn't have to, but it would be nice. The current setup works, but it would be nice to have an always working setup that doesn't come with a "what if". |
Can you give specific "what ifs" or cons for the alternative solutions I described earlier that doesn't apply to a package? |
I realized that it would be little use in my case, since I would still need the standard library. |
Duplicate of #15108. Feel free to subscribe to that. |
What version of Go are you using (
go version
)?What did you do?
I try to compile go code at run-time(not performance critical) and right now have to assume that the go command is available and up-to-date.
What did you expect to see?
I was hoping that there would be some kind of way to import the gc so I can compile the code from inside the program, eliminating the go dependency.
What did you see instead?
The gc is not exported but instead inside a /internal making it impossible to import and use in other programs/code-bases.
The text was updated successfully, but these errors were encountered: