With the update #6808 which changed the API for preprocessing hosts, I broke the Go platform example.
I've spent a little while starting at it to try and fix it. It would be great if it built the prebuilt binaries for both the legacy and surgical linkers like the basic-cli updates in this build-script diagram.
Basically my knowledge of the Go build system is limited to 30 minutes of googling, and wrangling the go.mod
file and coming up with a folder structure and build script that suits the "Go" way of doing things is taking me some time.
Just wondering if there are any gophers out there who would like to take this task on?
I wanted to add a glue plugin like below, so we can generate the roc_std library parts and not have these copied or manually written each time.
app [makeGlue] {
pf: platform "https://github.com/lukewilliamboswell/roc/releases/download/test/olBfrjtI-HycorWJMxdy7Dl2pcbbBoJy4mnSrDtRrlI.tar.br",
glue: "https://github.com/lukewilliamboswell/roc-glue-code-gen/releases/download/0.2.0/UxzK668CtOpuhc_ipLgFC60pKqA7BVskJlHjEt7Snrg.tar.br",
}
import pf.Types exposing [Types]
import pf.File exposing [File]
import glue.Go
makeGlue : List Types -> Result (List File) Str
makeGlue = \_ -> Ok Go.builtins
I created this PR to update the dynhost command.
To support the surgical linker and the legacy linker at the same time is possible. I do this in the kingfisher platform. The question is, what you want do demonstrate in the example. If you want to cross compile, then you have to use zig to help go crosscompile cgo. I was also able to do this in the kingfisher platform, but only with zig 0.11.0. I am not sure, why it does not work with newer versions of zig.
If you want, I could change the readme to describe, how to build the GoPlatform example for the legacy linker for the native target (without zig).
Last updated: Jul 06 2025 at 12:14 UTC