Skip to content
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

Are cross-platform builds possible using the Bud CLI? #252

Open
preslavrachev opened this issue Aug 19, 2022 · 1 comment
Open

Are cross-platform builds possible using the Bud CLI? #252

preslavrachev opened this issue Aug 19, 2022 · 1 comment
Labels
blocked Blocked upstream or by another issue needs decision Need to think more and decide

Comments

@preslavrachev
Copy link

Not a biggie, but I'd sometimes build Linux apps locally on my Mac, and throw them directly on one of my spare machines. It's just a time saver when I don't need to bother with setting up a build and deployment pipeline.

Anyway, while the standard go command allows cross-platform building, the following has no effect in Bud:

GOOS=linux GOARCH=amd64 bud build

It will simply produce a Mac (in my case) binary and ignore the options.

Out of curiosity, will this feature be supported, or is it preferable to build the Linux app on the target machine?

@matthewmueller
Copy link
Contributor

matthewmueller commented Aug 20, 2022

Hey @preslavrachev! I'd love to add cross-compilation support. Right now we're blocked by the V8 dependency which depends on CGO.

I'm working going to integrate https://github.com/livebud/js soon to support the Goja runtime, so you'll be able to swap to a slower, but CGO-less build.

One thing I'm wondering is how seamless it should be. I was thinking of if CGO_ENABLED=1, you'd switch over to the V8 build, otherwise it's the Goja build. Maybe this is going to be too subtle though. Goja is quite a bit slower than V8, so it might be an unexpected, undesirable swap.

@matthewmueller matthewmueller added blocked Blocked upstream or by another issue needs decision Need to think more and decide labels Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked upstream or by another issue needs decision Need to think more and decide
Projects
None yet
Development

No branches or pull requests

2 participants