-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: drop runtime from plugins #17150
Comments
/cc @crawshaw |
Yup, I had a TODO about this I lost somewhere in the CL patchsets. It should be straightforward, it's already possible to build -linkshared binaries without a runtime. I expect most of the work is careful argument construction in cmd/go. |
@crawshaw, still want to do this for Go 1.8? |
Pushing to 1.9, so I can spend what cycles I have on bugs. |
Change https://golang.org/cl/62352 mentions this issue: |
@hirochachacha at one point you had a CL exploring removing the runtime from plugins. Are you still working on it? |
@crawshaw No, I'm afraid not. |
I think I have this issue too in my code https://gitlab.com/montao/forbasile The background is that we want to generate a large number of plugins, and statically linked objects would take too much space. If the runtime is removed from the plugin then I think that the problem would be solved and we could use Go. Right now we are looking at other choices of implementation (C, Rust, custom...) instead. |
For what it is worth, my manydl.c is generating "randomly" the code of many plugins in C and compiling it and loading these many plugins. That program demonstrates that on Linux, one can have hundreds of thousands of So I believe it would be great if Go would practically support many plugins (in practice generated ones). The current implementation does that poorly (it is designed for a few, hand-written, plugins in mind). |
I found this CL, I think: https://go-review.googlesource.com/c/go/+/61090 Not sure what is the problem with it but it was abandoned. Any clues? |
I don't remember exactly, but I couldn't recommend investing that approach since that is a half-baked solution after all. It only cover |
It looks like plugins contain a copy of the runtime. I guess that copy is unused, and could probably be dropped, reducing binary size.
The text was updated successfully, but these errors were encountered: