Helloworld in Rust (Cross Platform)
The https://github.com/jreleaser/helloworld-rustx repository shows the configuration and steps to:
-
Compile a helloworld app for the following targets:
-
aarch64-apple-darwin
-
x86_64-apple-darwin
-
x86_64-pc-windows-msvc
-
x86_64-unknown-linux-gnu
-
-
Use
cross
to compile foraarch64-unknown-linux-gnu
-
Use
lipo
to generate an universal binary for apple-darwin -
Assemble zip distributions with JReleaser
-
Create rolling early-access releases with JReleaser on every push to
main
branch
JReleaser requires 2 additional inputs that may be set as environment variables, JRELEASER_PROJECT_VERSION and JRELEASER_GITHUB_TOKEN .
More information about environment variable configuration may be found here.
|
Original code based on Releasing Rust Binaries with JReleaser.