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

The standalone compiler should support cross compilation #161

Closed
CompeyDev opened this issue Mar 1, 2024 · 1 comment · Fixed by #162
Closed

The standalone compiler should support cross compilation #161

CompeyDev opened this issue Mar 1, 2024 · 1 comment · Fixed by #162
Labels
enhancement New feature or request

Comments

@CompeyDev
Copy link
Contributor

As of now, it isn't very straightforward to use the standalone compilation feature to support various platforms with lune. Lune should build on top of this system and include a cross-compilation system similar to tools such as pkg for node. This issue suggests a strategy to implement the aforementioned.

Proposed Implementation

  1. The build command should include two new flags: --base and --target, both to be used mutually exclusively. 

  2. Lune should maintain a target database at ~/.lune/targets. These would be collections of precompiled binaries for different platforms that can be readily patched with the build command. For example, a target for the Windows platform with runtime v0.7.11 would be stored at ~/.lune/targets/0.7.11/base-windows-x86_64.exe, or one for M1 macs with runtime v0.8.0 could be stored at ~/.lune/targets/0.8.0/base-aarch64-macos.bin. These targets would be conditionally downloaded from the build artifacts published to GitHub releases when the build command for a particular target is invoked for the first time.

  3. In case the user requests a target that lune doesn't provide precompiled binaries for, they can use the --base flag to provide a manually compiled lune binary for said target, which would then be patched.

@filiptibell filiptibell added the enhancement New feature or request label Mar 1, 2024
@CompeyDev
Copy link
Contributor Author

I've already started some work on this, just wanted to update here in case anyone was interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants