Allow linking against wasmtime's minimal build#272
Allow linking against wasmtime's minimal build#272effulgentsia wants to merge 7 commits intobytecodealliance:mainfrom
Conversation
|
Thanks for the PR! This is something that I'm not personally very well versed in with the Go ecosystem, however, so I'm a bit hesitant about this. Some concerns I have are:
|
I opened #273 for just that part.
I think we'll need the v43 release of wasmtime to come out first, since the gc_support setter is needed to be able to exercise the minimal build. But I can add the test coverage to this PR after that's out.
What do you think if we keep the .go files split as in the current PR, but instead of gating them on the corresponding feature, we just gate them on a single I originally thought per-feature tags would be nice in case anyone wants to use a custom compiled wasmtime binary that's somewhere in between minimal and full, but if someone is doing that, they already would need a more complex build script and can use other techniques than Go build tags to control it: for example, their build script could just delete the unwanted .go files from the |
|
This PR is now not mergeable. I'd like to do some cleanup on it first, but it now has test coverage. |
Wasmtime releases include precompiled "full" and "min" binaries. I'd like to create a Go application that uses the min binary. My main obstacle to this is that the Go source files call C functions that don't exist in the min binary, causing compilation to fail during linking.
This PR splits those Go functions out into separate files that are gated behind build tags.