summaryrefslogtreecommitdiff
path: root/docs/pages/3 - Common Project Layouts.md
diff options
context:
space:
mode:
authorAndrew Richards <richards.aj@gmail.com>2018-07-18 08:50:09 +0100
committerLi Haoyi <haoyi.sg@gmail.com>2018-07-18 15:50:09 +0800
commit1829391c0de0efcb96b1187fe35a0e9127e00d29 (patch)
tree4216bde1516e75fccbc8a8c6a0d1eebb5b929364 /docs/pages/3 - Common Project Layouts.md
parent2d779b8ccd0a2f29a7d14dc193b4ad093142b521 (diff)
downloadmill-1829391c0de0efcb96b1187fe35a0e9127e00d29.tar.gz
mill-1829391c0de0efcb96b1187fe35a0e9127e00d29.tar.bz2
mill-1829391c0de0efcb96b1187fe35a0e9127e00d29.zip
WIP: Scala native (#206)
* add scala-native PR#1143 as submodule * first pass at integrating scala-native build into mill including worker/bridge * add the native libraries to the compile and run classpath * sssshhh don't be so noisy * update scala-native to latest build WIP * update mill to latest scala-native build-api code * add test interface from scala-native this code is not published ornot published at the correct scala version so copy it in for now * implement tests for scala-native very messy at the moment also correct bridge version as much as possible with out a scala-native release * update to scala-native/master scala-native #1143 now merged * Remove scala-native submodule * updates for scala-native 0.3.7 release * fixes after rebase * make test framework agnostic and tidy dependencies * add robust method of getting JVM classpath for running tests support for multiple test frameworks tidy up * rebase fixes for 0.2.0 * add SbtNativeModule and tidy * rebase fixes * fix building of compile / run Classpath (via transitiveIvyDeps) better method of loading JVM test frameworks * add tests for build, run, utest, scalatest * move native tests into it own trait which can be extended/overidden * change release mode to a sealed trait instead of boolean * add logLevel to ScalaNativeModule and plumb in propagate release and log levels to test projects * use test-runner from scala-native instead of including project source add ability easily compile against scala-native snapshots * add some docs * update to 0.3.8
Diffstat (limited to 'docs/pages/3 - Common Project Layouts.md')
-rw-r--r--docs/pages/3 - Common Project Layouts.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/pages/3 - Common Project Layouts.md b/docs/pages/3 - Common Project Layouts.md
index a8c55a10..01ec2e85 100644
--- a/docs/pages/3 - Common Project Layouts.md
+++ b/docs/pages/3 - Common Project Layouts.md
@@ -101,6 +101,30 @@ latter of which runs your code on Node.js, which must be pre-installed)
`ScalaJSModule` also exposes the `foo.fastOpt` and `foo.fullOpt` tasks for
generating the optimized Javascript file.
+### Scala Native Modules
+
+```
+import mill._
+import mill.define._
+import mill.scalanativelib._
+
+object nativehello extends ScalaNativeModule {
+ def scalaVersion = "2.11.12"
+ def scalaNativeVersion = "0.3.7"
+ def logLevel = NativeLogLevel.Info // optional
+ def releaseMode = ReleaseMode.Debug // optional
+}
+```
+
+`ScalaNativeModule` builds scala sources to executable binaries using [Scala Native](http://www.scala-native.org).
+You will need to have the [relevant parts](http://www.scala-native.org/en/latest/user/setup.html)
+of the LLVM toolchain installed on your system. Optimized binaries can be built by setting
+`releaseMode` (see above) and more verbose logging can be enabled using `logLevel`.
+Currently two test frameworks are supported [utest](https://github.com/lihaoyi/utest) and [scalatest](http://www.scalatest.org/).
+Support for [scalacheck](https://www.scalacheck.org/) should be possible when the relevant artifacts have been published
+for scala native.
+
+
### SBT-Compatible Modules
```scala