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

Make assembly jars Actually Portable Executables (500USD Bounty) #4445

Open
lihaoyi opened this issue Feb 1, 2025 · 5 comments
Open

Make assembly jars Actually Portable Executables (500USD Bounty) #4445

lihaoyi opened this issue Feb 1, 2025 · 5 comments
Labels

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Feb 1, 2025


From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.

See https://github.com/orgs/com-lihaoyi/discussions/6 for other bounties and the terms and conditions that bounties operate under


https://justine.lol/ape.html

This should allow us to to get rid of the necessity to rename them to .bat extensions to run them on windows, and allow them to just be run directly regardless of name

Seems like APE supports all the same platforms as Graal does, so the only thing missing would be windows-arm support. https://github.com/jart/cosmopolitan/wiki/Features#systems-and-cpu-arch-supported

@lihaoyi lihaoyi changed the title Make assembly jars Actually Portable Executables Make assembly jars Actually Portable Executables (500USD Bounty) Feb 2, 2025
@lihaoyi lihaoyi added the bounty label Feb 2, 2025
@BenraouaneSoufiane
Copy link

@lihaoyi can I work on this?

@lihaoyi
Copy link
Member Author

lihaoyi commented Feb 4, 2025

@BenraouaneSoufiane go for it, bounties are open until closed

@kiendang
Copy link

kiendang commented Feb 7, 2025

@lihaoyi One approach I can think of for this is to compile something like this using cosmopolitan

// not actual C code, massively simplified
int main(int argc, char* argv[]) {
  exec...("java", "-cp", argv[0], "<main class>", <rest of argv>)
}

and prepend the compiled binary to the assembly jar. The resulting out.jar should run cross platform.

@kiendang
Copy link

kiendang commented Feb 7, 2025

Put up a rough PR at #4503 to illustrate the idea.

@kiendang
Copy link

kiendang commented Feb 7, 2025

We can go one step further with APE though. There is an ongoing effort to bring Cosmopolitan support to GraalVM, then it's possible to produce cross-platform native images.

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

No branches or pull requests

3 participants