mill icon indicating copy to clipboard operation
mill copied to clipboard

Add Scala-Native examples (500USD bounty)

Open lihaoyi opened this issue 1 year ago • 4 comments


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


We already have Scala-Native support in scalanativelib, but it is not very discoverable and is not covered in the docsite. We should add example tests with explanations and include them in the docsite so people can read the docs and learn how to get started with a simple scala-native project.

This ticket is to add the following examples to a new example/scalalib/native folder:

  1. [ ] example/scalalib/native/1-simple: a simple hello-world Scala native project, similar to example/scalalib/basic/1-simple: build, test, run of a trivial one-module project with some trivial thirdparty dependencies

  2. [ ] example/scalalib/native/2-interop: a Scala-native project that interops with native C code that is compiled as part of the build, similar to example/javalib/module/15-jni

  3. [ ] example/scalalib/native/3-multi-module: a version of example/scalalib/basic/3-multi-module except the two modules are scala-native modules each with their own C code, and with both Scala- and C-level dependencies between the two modules

  4. [ ] example/scalalib/native/4-common-config: a version of example/scalalib/module/1-common-config but giving an overview of the important Scala-Native config specific overrides rather than the generic-Scala config overrides

These should be included in a new page in the documentation docs/modules/ROOT/pages/scalalib/native-examples.adoc titled Scala Native Examples, similar to docs/modules/ROOT/pages/scalalib/web-examples.adoc.

All the scala-native integration code should already be there, this ticket is just about documenting it and making it discoverable

lihaoyi avatar Oct 01 '24 23:10 lihaoyi

Paypal ?

ByteJoseph avatar Oct 03 '24 05:10 ByteJoseph

Bank transfer, as stated in the description

lihaoyi avatar Oct 03 '24 05:10 lihaoyi

Do I understand correctly from https://github.com/com-lihaoyi/mill/pull/3583 that it would make those automatically available from mill init ? If so, that's brilliant :)

rom1dep avatar Oct 04 '24 18:10 rom1dep

@rom1dep yes these can become automatically available from mill init. That's the whole point of #3583 after all!

lihaoyi avatar Oct 05 '24 12:10 lihaoyi